more delistification
This commit is contained in:
@@ -310,7 +310,7 @@ bool ConfIndexer::createAspellDict()
|
||||
return true;
|
||||
}
|
||||
|
||||
list<string> ConfIndexer::getStemmerNames()
|
||||
vector<string> ConfIndexer::getStemmerNames()
|
||||
{
|
||||
return Rcl::Db::getStemmerNames();
|
||||
}
|
||||
|
||||
+1
-1
@@ -107,7 +107,7 @@ class ConfIndexer {
|
||||
bool createAspellDict();
|
||||
|
||||
/** List possible stemmer names */
|
||||
static list<string> getStemmerNames();
|
||||
static vector<string> getStemmerNames();
|
||||
|
||||
/** Index a list of files. No db cleaning or stemdb updating */
|
||||
bool indexFiles(list<string> &files, IxFlag f = IxFNone);
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
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<string> paths;
|
||||
vector<string> paths;
|
||||
if (subtreelist(conf, ev.m_path, paths)) {
|
||||
deleted.insert(deleted.end(),
|
||||
paths.begin(), paths.end());
|
||||
|
||||
@@ -394,8 +394,8 @@ int main(int argc, char **argv)
|
||||
} else if (op_flags & OPT_l) {
|
||||
if (argc != 0)
|
||||
Usage();
|
||||
list<string> stemmers = ConfIndexer::getStemmerNames();
|
||||
for (list<string>::const_iterator it = stemmers.begin();
|
||||
vector<string> stemmers = ConfIndexer::getStemmerNames();
|
||||
for (vector<string>::const_iterator it = stemmers.begin();
|
||||
it != stemmers.end(); it++) {
|
||||
cout << *it << endl;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "debuglog.h"
|
||||
|
||||
bool subtreelist(RclConfig *config, const string& top,
|
||||
list<string>& paths)
|
||||
vector<string>& 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 <string.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
@@ -115,12 +115,12 @@ int main(int argc, char **argv)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
list<string> paths;
|
||||
vector<string> paths;
|
||||
if (!subtreelist(config, top, paths)) {
|
||||
cerr << "subtreelist failed" << endl;
|
||||
exit(1);
|
||||
}
|
||||
for (list<string>::const_iterator it = paths.begin();
|
||||
for (vector<string>::const_iterator it = paths.begin();
|
||||
it != paths.end(); it++) {
|
||||
cout << *it << endl;
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
#ifndef _SUBTREELIST_H_INCLUDED_
|
||||
#define _SUBTREELIST_H_INCLUDED_
|
||||
|
||||
#include <list>
|
||||
using std::list;
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
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<string>& paths);
|
||||
std::vector<std::string>& paths);
|
||||
|
||||
#endif /* _SUBTREELIST_H_INCLUDED_ */
|
||||
|
||||
Reference in New Issue
Block a user