suppressed a few wasteful string-cstr conversions

This commit is contained in:
dockes
2008-07-01 11:51:51 +00:00
parent 0460f1016c
commit 022e0e5f43
14 changed files with 78 additions and 71 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: wasastringtoquery.cpp,v 1.6 2007-11-16 12:21:46 dockes Exp $ (C) 2006 J.F.Dockes";
static char rcsid[] = "@(#$Id: wasastringtoquery.cpp,v 1.7 2008-07-01 11:51:51 dockes Exp $ (C) 2006 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@@ -44,7 +44,7 @@ WasaQuery::~WasaQuery()
void WasaQuery::describe(string &desc) const
{
desc += "(";
string fieldspec = m_fieldspec.empty() ? "" : m_fieldspec + ": ";
string fieldspec = m_fieldspec.empty() ? string() : m_fieldspec + ": ";
switch (m_op) {
case OP_NULL:
desc += "NULL";
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: xadump.cpp,v 1.17 2008-04-18 11:39:47 dockes Exp $ (C) 2004 J.F.Dockes";
static char rcsid[] = "@(#$Id: xadump.cpp,v 1.18 2008-07-01 11:51:51 dockes Exp $ (C) 2004 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@@ -168,8 +168,8 @@ int main(int argc, char **argv)
if (op_flags & OPT_T) {
Xapian::TermIterator term;
string printable;
string op = (op_flags & OPT_n) ? "": "[";
string cl = (op_flags & OPT_n) ? "": "]";
string op = (op_flags & OPT_n) ? string(): "[";
string cl = (op_flags & OPT_n) ? string(): "]";
if (op_flags & OPT_i) {
for (term = db->termlist_begin(docid);
term != db->termlist_end(docid);term++) {