diff --git a/src/common/textsplit.cpp b/src/common/textsplit.cpp index 2c0cf283..a7307e5d 100644 --- a/src/common/textsplit.cpp +++ b/src/common/textsplit.cpp @@ -780,9 +780,9 @@ template bool u8stringToStrings(const string &s, T &tokens) return true; } -bool TextSplit::stringToStrings(const string &s, list &tokens) +bool TextSplit::stringToStrings(const string &s, vector &tokens) { - return u8stringToStrings >(s, tokens); + return u8stringToStrings >(s, tokens); } #else // TEST driver -> diff --git a/src/common/textsplit.h b/src/common/textsplit.h index 2b58e977..c9c9fb41 100644 --- a/src/common/textsplit.h +++ b/src/common/textsplit.h @@ -18,11 +18,11 @@ #define _TEXTSPLIT_H_INCLUDED_ #include -#include +#include #ifndef NO_NAMESPACES using std::string; -using std::list; +using std::vector; #endif class Utf8Iter; @@ -94,7 +94,7 @@ public: * non-utf-8 input (iso-8859 config files work ok). This hopefully * handles all Unicode whitespace, but needs correct utf-8 input */ - static bool stringToStrings(const string &s, list &tokens); + static bool stringToStrings(const string &s, vector &tokens); /** Is char CJK ? */ static bool isCJK(int c); diff --git a/src/index/indexer.cpp b/src/index/indexer.cpp index fce79d0f..4f35563d 100644 --- a/src/index/indexer.cpp +++ b/src/index/indexer.cpp @@ -310,7 +310,7 @@ bool ConfIndexer::createAspellDict() return true; } -list ConfIndexer::getStemmerNames() +vector ConfIndexer::getStemmerNames() { return Rcl::Db::getStemmerNames(); } diff --git a/src/index/indexer.h b/src/index/indexer.h index 735d3942..7582afb0 100644 --- a/src/index/indexer.h +++ b/src/index/indexer.h @@ -107,7 +107,7 @@ class ConfIndexer { bool createAspellDict(); /** List possible stemmer names */ - static list getStemmerNames(); + static vector getStemmerNames(); /** Index a list of files. No db cleaning or stemdb updating */ bool indexFiles(list &files, IxFlag f = IxFNone); diff --git a/src/index/rclmonprc.cpp b/src/index/rclmonprc.cpp index 70fd82c5..243b98e3 100644 --- a/src/index/rclmonprc.cpp +++ b/src/index/rclmonprc.cpp @@ -35,6 +35,9 @@ #include #include #include +#include +using std::list; +using std::vector; #include "debuglog.h" #include "rclmon.h" @@ -501,7 +504,7 @@ bool startMonitor(RclConfig *conf, int opts) // purge. deleted.push_back(ev.m_path); if (ev.evflags() & RclMonEvent::RCLEVT_ISDIR) { - list paths; + vector paths; if (subtreelist(conf, ev.m_path, paths)) { deleted.insert(deleted.end(), paths.begin(), paths.end()); diff --git a/src/index/recollindex.cpp b/src/index/recollindex.cpp index d5b1fb6b..b8480979 100644 --- a/src/index/recollindex.cpp +++ b/src/index/recollindex.cpp @@ -394,8 +394,8 @@ int main(int argc, char **argv) } else if (op_flags & OPT_l) { if (argc != 0) Usage(); - list stemmers = ConfIndexer::getStemmerNames(); - for (list::const_iterator it = stemmers.begin(); + vector stemmers = ConfIndexer::getStemmerNames(); + for (vector::const_iterator it = stemmers.begin(); it != stemmers.end(); it++) { cout << *it << endl; } diff --git a/src/index/subtreelist.cpp b/src/index/subtreelist.cpp index 313d9ffc..65270a63 100644 --- a/src/index/subtreelist.cpp +++ b/src/index/subtreelist.cpp @@ -25,7 +25,7 @@ #include "debuglog.h" bool subtreelist(RclConfig *config, const string& top, - list& paths) + vector& paths) { LOGDEB(("subtreelist: top: [%s]\n", top.c_str())); Rcl::Db rcldb(config); @@ -65,7 +65,7 @@ bool subtreelist(RclConfig *config, const string& top, #include #include -#include +#include #include using namespace std; @@ -115,12 +115,12 @@ int main(int argc, char **argv) exit(1); } - list paths; + vector paths; if (!subtreelist(config, top, paths)) { cerr << "subtreelist failed" << endl; exit(1); } - for (list::const_iterator it = paths.begin(); + for (vector::const_iterator it = paths.begin(); it != paths.end(); it++) { cout << *it << endl; } diff --git a/src/index/subtreelist.h b/src/index/subtreelist.h index 3dda3d98..b73ebe14 100644 --- a/src/index/subtreelist.h +++ b/src/index/subtreelist.h @@ -18,8 +18,8 @@ #ifndef _SUBTREELIST_H_INCLUDED_ #define _SUBTREELIST_H_INCLUDED_ -#include -using std::list; +#include +#include class RclConfig; @@ -28,6 +28,6 @@ class RclConfig; // the real time indexer to purge entries when a top directory is // renamed. This is really convoluted, I'd like a better way. extern bool subtreelist(RclConfig *config, const string& top, - list& paths); + std::vector& paths); #endif /* _SUBTREELIST_H_INCLUDED_ */ diff --git a/src/qtgui/confgui/confguiindex.cpp b/src/qtgui/confgui/confguiindex.cpp index 9b33bd53..0965d4e1 100644 --- a/src/qtgui/confgui/confguiindex.cpp +++ b/src/qtgui/confgui/confguiindex.cpp @@ -184,9 +184,9 @@ ConfTopPanelW::ConfTopPanelW(QWidget *parent, ConfNull *config) setSzPol(eskp, QSizePolicy::Preferred, QSizePolicy::Preferred, 1, 3); gl1->addWidget(eskp, 1, 0, 1, 2); - list cstemlangs = Rcl::Db::getStemmerNames(); + vector cstemlangs = Rcl::Db::getStemmerNames(); QStringList stemlangs; - for (list::const_iterator it = cstemlangs.begin(); + for (vector::const_iterator it = cstemlangs.begin(); it != cstemlangs.end(); it++) { stemlangs.push_back(QString::fromUtf8(it->c_str())); } diff --git a/src/qtgui/rclmain_w.cpp b/src/qtgui/rclmain_w.cpp index 6e47f0d4..48f06660 100644 --- a/src/qtgui/rclmain_w.cpp +++ b/src/qtgui/rclmain_w.cpp @@ -1083,7 +1083,8 @@ void RclMain::showActiveTypes() // Build the set of mtypes, stripping the prefix set mtypesfromdb; - for (list::const_iterator it = matches.entries.begin(); + for (vector::const_iterator it = + matches.entries.begin(); it != matches.entries.end(); it++) { mtypesfromdb.insert(it->term.substr(prefix.size())); } diff --git a/src/qtgui/spell_w.cpp b/src/qtgui/spell_w.cpp index bca586d1..0a4b826d 100644 --- a/src/qtgui/spell_w.cpp +++ b/src/qtgui/spell_w.cpp @@ -184,7 +184,7 @@ void SpellW::doExpand() resTW->setItem(0, 0, new QTableWidgetItem(tr("No expansion found"))); } else { int row = 0; - for (list::iterator it = res.entries.begin(); + for (vector::iterator it = res.entries.begin(); it != res.entries.end(); it++) { LOGDEB(("SpellW::expand: %6d [%s]\n", it->wcf, it->term.c_str())); char num[30]; diff --git a/src/qtgui/ssearch_w.cpp b/src/qtgui/ssearch_w.cpp index a458c8bd..6c64ade3 100644 --- a/src/qtgui/ssearch_w.cpp +++ b/src/qtgui/ssearch_w.cpp @@ -299,7 +299,7 @@ void SSearch::completion() ok = true; } else { QStringList lst; - for (list::iterator it = tmres.entries.begin(); + for (vector::iterator it = tmres.entries.begin(); it != tmres.entries.end(); it++) { lst.push_back(QString::fromUtf8(it->term.c_str())); } diff --git a/src/rcldb/rcldb.cpp b/src/rcldb/rcldb.cpp index 592bfaed..84b0929d 100644 --- a/src/rcldb/rcldb.cpp +++ b/src/rcldb/rcldb.cpp @@ -227,7 +227,7 @@ bool Db::Native::dbDataToRclDoc(Xapian::docid docid, std::string &data, return true; } -// Remove prefixes (caps) from a list of terms. +// Remove prefixes (caps) from terms. static void noPrefixList(const vector& in, vector& out) { for (vector::const_iterator qit = in.begin(); @@ -592,9 +592,9 @@ Db::~Db() i_close(true); } -list Db::getStemmerNames() +vector Db::getStemmerNames() { - list res; + vector res; stringToStrings(Xapian::Stem::get_available_languages(), res); return res; } @@ -652,7 +652,7 @@ bool Db::open(OpenMode mode, OpenError *error) default: m_ndb->m_iswritable = false; m_ndb->xrdb = Xapian::Database(dir); - for (list::iterator it = m_extraDbs.begin(); + for (vector::iterator it = m_extraDbs.begin(); it != m_extraDbs.end(); it++) { if (error) *error = DbOpenExtraDb; @@ -814,7 +814,7 @@ bool Db::rmQueryDb(const string &dir) if (dir.empty()) { m_extraDbs.clear(); } else { - list::iterator it = find(m_extraDbs.begin(), + vector::iterator it = find(m_extraDbs.begin(), m_extraDbs.end(), dir); if (it != m_extraDbs.end()) { m_extraDbs.erase(it); @@ -1454,7 +1454,7 @@ bool Db::needUpdate(const string &udi, const string& sig) // Set the existence flag for all the subdocs (if any) vector docids; if (!m_ndb->subDocs(udi, docids)) { - LOGERR(("Rcl::Db::needUpdate: can't get subdocs list\n")); + LOGERR(("Rcl::Db::needUpdate: can't get subdocs\n")); return true; } for (vector::iterator it = docids.begin(); @@ -1480,7 +1480,7 @@ bool Db::needUpdate(const string &udi, const string& sig) } -// Return list of existing stem db languages +// Return existing stem db languages vector Db::getStemLangs() { LOGDEB(("Db::getStemLang\n")); @@ -1645,7 +1645,7 @@ bool Db::purgeFile(const string &udi, bool *existed) } // File name wild card expansion. This is a specialisation ot termMatch -bool Db::filenameWildExp(const string& fnexp, list& names) +bool Db::filenameWildExp(const string& fnexp, vector& names) { string pattern = fnexp; names.clear(); @@ -1665,7 +1665,7 @@ bool Db::filenameWildExp(const string& fnexp, list& names) TermMatchResult result; if (!termMatch(ET_WILD, string(), pattern, result, 1000, Doc::keyfn)) return false; - for (list::const_iterator it = result.entries.begin(); + for (vector::const_iterator it = result.entries.begin(); it != result.entries.end(); it++) names.push_back(it->term); @@ -1685,7 +1685,7 @@ bool Db::maxYearSpan(int *minyear, int *maxyear) TermMatchResult result; if (!termMatch(ET_WILD, string(), "*", result, 5000, "xapyear")) return false; - for (list::const_iterator it = result.entries.begin(); + for (vector::const_iterator it = result.entries.begin(); it != result.entries.end(); it++) { if (!it->term.empty()) { int year = atoi(it->term.c_str()+1); @@ -1721,9 +1721,9 @@ public: bool Db::stemExpand(const string &lang, const string &term, TermMatchResult& result, int max) { - list dirs = m_extraDbs; - dirs.push_front(m_basedir); - for (list::iterator it = dirs.begin(); it != dirs.end(); it++) { + vector dirs(1, m_basedir); + dirs.insert(dirs.end(), m_extraDbs.begin(), m_extraDbs.end()); + for (vector::iterator it = dirs.begin(); it != dirs.end(); it++) { vector more; StemDb::stemExpand(*it, lang, term, more); LOGDEB1(("Db::stemExpand: Got %d from %s\n", @@ -1737,11 +1737,11 @@ bool Db::stemExpand(const string &lang, const string &term, } /** Add prefix to all strings in list */ -static void addPrefix(list& terms, const string& prefix) +static void addPrefix(vector& terms, const string& prefix) { if (prefix.empty()) return; - for (list::iterator it = terms.begin(); + for (vector::iterator it = terms.begin(); it != terms.end(); it++) it->term.insert(0, prefix); } @@ -1795,9 +1795,9 @@ bool Db::termMatch(MatchType typ, const string &lang, if (typ == ET_STEM) { if (!stemExpand(lang, root, res, max)) return false; - res.entries.sort(); - res.entries.unique(); - for (list::iterator it = res.entries.begin(); + sort(res.entries.begin(), res.entries.end()); + unique(res.entries.begin(), res.entries.end()); + for (vector::iterator it = res.entries.begin(); it != res.entries.end(); it++) { XAPTRY(it->wcf = xdb.get_collection_freq(it->term); it->docs = xdb.get_termfreq(it->term), @@ -1884,11 +1884,11 @@ bool Db::termMatch(MatchType typ, const string &lang, } TermMatchCmpByTerm tcmp; - res.entries.sort(tcmp); + sort(res.entries.begin(), res.entries.end(), tcmp); TermMatchTermEqual teq; - res.entries.unique(teq); + unique(res.entries.begin(), res.entries.end(), teq); TermMatchCmpByWcf wcmp; - res.entries.sort(wcmp); + sort(res.entries.begin(), res.entries.end(), wcmp); if (max > 0) { res.entries.resize(MIN(res.entries.size(), (unsigned int)max)); } diff --git a/src/rcldb/rcldb.h b/src/rcldb/rcldb.h index 1596095e..d3f1f60f 100644 --- a/src/rcldb/rcldb.h +++ b/src/rcldb/rcldb.h @@ -18,7 +18,6 @@ #define _DB_H_INCLUDED_ #include -#include #include #include "cstr.h" @@ -29,7 +28,6 @@ #ifndef NO_NAMESPACES using std::string; -using std::list; using std::vector; #endif @@ -80,8 +78,8 @@ public: TermMatchEntry() : wcf(0) {} TermMatchEntry(const string&t, int f, int d) : term(t), wcf(f), docs(d) {} TermMatchEntry(const string&t) : term(t), wcf(0) {} - bool operator==(const TermMatchEntry &o) { return term == o.term;} - bool operator<(const TermMatchEntry &o) { return term < o.term;} + bool operator==(const TermMatchEntry &o) const { return term == o.term;} + bool operator<(const TermMatchEntry &o) const { return term < o.term;} string term; int wcf; // Total count of occurrences within collection. int docs; // Number of documents countaining term. @@ -91,7 +89,7 @@ class TermMatchResult { public: TermMatchResult() {clear();} void clear() {entries.clear(); dbdoccount = 0; dbavgdoclen = 0;} - list entries; + vector entries; unsigned int dbdoccount; double dbavgdoclen; }; @@ -124,8 +122,11 @@ class Db { /** Get explanation about last error */ string getReason() const {return m_reason;} - /** List possible stemmer names */ - static list getStemmerNames(); + /** Return all possible stemmer names */ + static vector getStemmerNames(); + + /** Return existing stemming databases */ + vector getStemLangs(); /** Test word for spelling correction candidate: not too long, no special chars... */ @@ -139,8 +140,6 @@ class Db { return true; } - /** List existing stemming databases */ - std::vector getStemLangs(); #ifdef TESTING_XAPIAN_SPELL /** Return spelling suggestion */ @@ -148,7 +147,7 @@ class Db { #endif /* The next two, only for searchdata, should be somehow hidden */ - /* Return list of configured stop words */ + /* Return configured stop words */ const StopList& getStopList() const {return m_stops;} /* Field name to prefix translation (ie: author -> 'A') */ bool fieldToTraits(const string& fldname, const FieldTraits **ftpp); @@ -201,7 +200,7 @@ class Db { /** Tell if directory seems to hold xapian db */ static bool testDbDir(const string &dir); - /** Return a list of index terms that match the input string + /** Return the index terms that match the input string * Expansion is performed either with either wildcard or regexp processing * Stem expansion is performed if lang is not empty */ enum MatchType {ET_WILD, ET_REGEXP, ET_STEM}; @@ -215,7 +214,7 @@ class Db { /** Special filename wildcard to XSFN terms expansion. internal/searchdata use only */ - bool filenameWildExp(const string& exp, list& names); + bool filenameWildExp(const string& exp, vector& names); /** Set parameters for synthetic abstract generation */ void setAbstractParams(int idxTrunc, int synthLen, int syntCtxLen); @@ -287,8 +286,8 @@ private: int m_maxFsOccupPc; // Database directory string m_basedir; - // List of directories for additional databases to query - list m_extraDbs; + // Xapian directories for additional databases to query + vector m_extraDbs; OpenMode m_mode; // File existence vector: this is filled during the indexing pass. Any // document whose bit is not set at the end is purged diff --git a/src/rcldb/searchdata.cpp b/src/rcldb/searchdata.cpp index 6f6a4a5b..78b09413 100644 --- a/src/rcldb/searchdata.cpp +++ b/src/rcldb/searchdata.cpp @@ -364,7 +364,7 @@ bool SearchData::maybeAddAutoPhrase(Rcl::Db& db, double freqThreshold) } string field; - list words; + vector words; // Walk the clause list. If we find any non simple clause or different // field names, bail out. for (qlist_it_t it = m_query.begin(); it != m_query.end(); it++) { @@ -409,7 +409,7 @@ bool SearchData::maybeAddAutoPhrase(Rcl::Db& db, double freqThreshold) if (!doccnt) doccnt = 1; string swords; - for (list::iterator it = words.begin(); + for (vector::iterator it = words.begin(); it != words.end(); it++) { double freq = double(db.termDocCnt(*it)) / doccnt; if (freq < freqThreshold) { @@ -598,7 +598,7 @@ public: bool processUserString(const string &iq, string &ermsg, - list &pqueries, + vector &pqueries, const StopList &stops, int slack = 0, bool useNear = false); // After processing the string: return search terms and term @@ -616,13 +616,14 @@ public: } private: - void expandTerm(bool dont, const string& term, list& exp, + void expandTerm(bool dont, const string& term, vector& exp, string& sterm, const string& prefix); // After splitting entry on whitespace: process non-phrase element - void processSimpleSpan(const string& span, bool nostemexp, list &pqueries); + void processSimpleSpan(const string& span, bool nostemexp, + vector &pqueries); // Process phrase/near element void processPhraseOrNear(TextSplitQ *splitData, - list &pqueries, + vector &pqueries, bool useNear, int slack, int mods); Db& m_db; @@ -644,14 +645,6 @@ static void listVector(const string& what, const vector&l) } LOGDEB(("%s: %s\n", what.c_str(), a.c_str())); } -static void listList(const string& what, const list& l) -{ - string a; - for (list::const_iterator it = l.begin(); it != l.end(); it++) { - a = a + *it + " "; - } - LOGDEB(("%s: %s\n", what.c_str(), a.c_str())); -} #endif /** Expand stem and wildcards @@ -668,7 +661,7 @@ static void listList(const string& what, const list& l) */ void StringToXapianQ::expandTerm(bool nostemexp, const string& term, - list& exp, + vector& exp, string &sterm, const string& prefix) { LOGDEB2(("expandTerm: field [%s] term [%s] stemlang [%s] nostemexp %d\n", @@ -690,8 +683,8 @@ void StringToXapianQ::expandTerm(bool nostemexp, if (nostemexp && !haswild) { sterm = term; m_uterms.push_back(sterm); - exp.push_front(prefix + term); exp.resize(1); + exp[0] = prefix + term; } else { TermMatchResult res; if (haswild) { @@ -703,7 +696,7 @@ void StringToXapianQ::expandTerm(bool nostemexp, m_db.termMatch(Rcl::Db::ET_STEM, m_stemlang, term, res, -1, m_field); } - for (list::const_iterator it = res.entries.begin(); + for (vector::const_iterator it = res.entries.begin(); it != res.entries.end(); it++) { exp.push_back(it->term); } @@ -746,11 +739,11 @@ void multiply_groups(vector >::const_iterator vvit, } void StringToXapianQ::processSimpleSpan(const string& span, bool nostemexp, - list &pqueries) + vector &pqueries) { LOGDEB2(("StringToXapianQ::processSimpleSpan: [%s] nostemexp %d\n", span.c_str(), int(nostemexp))); - list exp; + vector exp; string sterm; // dumb version of user term string prefix; @@ -762,7 +755,7 @@ void StringToXapianQ::processSimpleSpan(const string& span, bool nostemexp, expandTerm(nostemexp, span, exp, sterm, prefix); // m_terms is used for highlighting, we don't want prefixes in there. - for (list::const_iterator it = exp.begin(); + for (vector::const_iterator it = exp.begin(); it != exp.end(); it++) { m_terms.push_back(it->substr(prefix.size())); } @@ -787,12 +780,12 @@ void StringToXapianQ::processSimpleSpan(const string& span, bool nostemexp, // queries if the terms get expanded by stemming or wildcards (we // don't do stemming for PHRASE though) void StringToXapianQ::processPhraseOrNear(TextSplitQ *splitData, - list &pqueries, + vector &pqueries, bool useNear, int slack, int mods) { Xapian::Query::op op = useNear ? Xapian::Query::OP_NEAR : Xapian::Query::OP_PHRASE; - list orqueries; + vector orqueries; bool hadmultiple = false; vector >groups; @@ -818,13 +811,13 @@ void StringToXapianQ::processPhraseOrNear(TextSplitQ *splitData, bool nostemexp = *nxit || (op == Xapian::Query::OP_PHRASE) || hadmultiple; string sterm; - list exp; + vector exp; expandTerm(nostemexp, *it, exp, sterm, prefix); LOGDEB0(("ProcessPhrase: exp size %d\n", exp.size())); - listList("", exp); + listVector("", exp); // groups is used for highlighting, we don't want prefixes in there. vector noprefs; - for (list::const_iterator it = exp.begin(); + for (vector::const_iterator it = exp.begin(); it != exp.end(); it++) { noprefs.push_back(it->substr(prefix.size())); } @@ -894,7 +887,7 @@ static int stringToMods(string& s) */ bool StringToXapianQ::processUserString(const string &iq, string &ermsg, - list &pqueries, + vector &pqueries, const StopList& stops, int slack, bool useNear @@ -913,13 +906,13 @@ bool StringToXapianQ::processUserString(const string &iq, // "words" are really phrases, this depends on separators: // [paul@dom.net] would still be a word (span), but [about:me] // will probably be handled as a phrase. - list phrases; + vector phrases; TextSplit::stringToStrings(iq, phrases); // Process each element: textsplit into terms, handle stem/wildcard // expansion and transform into an appropriate Xapian::Query try { - for (list::iterator it = phrases.begin(); + for (vector::iterator it = phrases.begin(); it != phrases.end(); it++) { LOGDEB0(("strToXapianQ: phrase/word: [%s]\n", it->c_str())); int mods = stringToMods(*it); @@ -1006,7 +999,7 @@ bool SearchDataClauseSimple::toNativeQuery(Rcl::Db &db, void *p, LOGERR(("SearchDataClauseSimple: bad m_tp %d\n", m_tp)); return false; } - list pqueries; + vector pqueries; // We normally boost the original term in the stem expansion list. Don't // do it if there are wildcards anywhere, this would skew the results. @@ -1046,12 +1039,12 @@ bool SearchDataClauseFilename::toNativeQuery(Rcl::Db &db, void *p, Xapian::Query *qp = (Xapian::Query *)p; *qp = Xapian::Query(); - list patterns; + vector patterns; TextSplit::stringToStrings(m_text, patterns); - list names; - for (list::iterator it = patterns.begin(); + vector names; + for (vector::iterator it = patterns.begin(); it != patterns.end(); it++) { - list more; + vector more; db.filenameWildExp(*it, more); Xapian::Query tq = Xapian::Query(Xapian::Query::OP_OR, more.begin(), more.end()); @@ -1076,7 +1069,7 @@ bool SearchDataClauseDist::toNativeQuery(Rcl::Db &db, void *p, Xapian::Query *qp = (Xapian::Query *)p; *qp = Xapian::Query(); - list pqueries; + vector pqueries; Xapian::Query nq; // We normally boost the original term in the stem expansion list. Don't diff --git a/src/rcldb/stemdb.cpp b/src/rcldb/stemdb.cpp index ccf50f4f..dfe80cc4 100644 --- a/src/rcldb/stemdb.cpp +++ b/src/rcldb/stemdb.cpp @@ -90,13 +90,13 @@ p_notlowerascii(unsigned int c) } static bool addAssoc(Xapian::WritableDatabase &sdb, const string& stem, - const list& derivs) + const vector& derivs) { Xapian::Document newdocument; newdocument.add_term(stem); // The doc data is just parents=blank-separated-list string record = "parents="; - for (list::const_iterator it = derivs.begin(); + for (vector::const_iterator it = derivs.begin(); it != derivs.end(); it++) { record += *it + " "; } @@ -215,7 +215,7 @@ bool createDb(Xapian::Database& xdb, const string& dbdir, const string& lang) // Enter pseud-docs in db by walking the multimap. string stem; - list derivs; + vector derivs; for (multimap::const_iterator it = assocs.begin(); it != assocs.end(); it++) { if (stem == it->first) { @@ -350,9 +350,9 @@ bool stemExpand(const std::string& dbdir, vector& result) { - list llangs; + vector llangs; stringToStrings(langs, llangs); - for (list::const_iterator it = llangs.begin(); + for (vector::const_iterator it = llangs.begin(); it != llangs.end(); it++) { vector oneexp; stemExpandOne(dbdir, *it, term, oneexp);