Fixed namespace decls issues

This commit is contained in:
Jean-Francois Dockes
2018-04-18 09:34:58 +02:00
parent 2176d81e60
commit ea3bd23d7c
5 changed files with 115 additions and 109 deletions
+2 -3
View File
@@ -18,7 +18,6 @@
#define _beaglequeue_h_included_
#include <list>
using std::list;
/**
* Process the Beagle indexing queue.
@@ -56,11 +55,11 @@ public:
/** Index a list of files. No db cleaning or stemdb updating.
* Used by the real time monitor */
bool indexFiles(list<string>& files);
bool indexFiles(std::list<std::string>& files);
/** Purge a list of files. No way to do this currently and dont want
* to do anything as this is mostly called by the monitor when *I* delete
* files inside the queue dir */
bool purgeFiles(list<string>& files) {return true;}
bool purgeFiles(std::list<std::string>& files) {return true;}
/** Called when indexing data from the cache, and from internfile for
* search result preview */
+10 -8
View File
@@ -37,6 +37,10 @@
#include "rclaspell.h"
#endif
using std::list;
using std::string;
using std::vector;
// This would more logically live in recollindex.cpp, but then librecoll would
// have an undefined symbol
ConfSimple idxreasons;
@@ -182,9 +186,8 @@ bool ConfIndexer::indexFiles(list<string>& ifiles, int flag)
{
list<string> myfiles;
string origcwd = m_config->getOrigCwd();
for (list<string>::const_iterator it = ifiles.begin();
it != ifiles.end(); it++) {
myfiles.push_back(path_canon(*it, &origcwd));
for (const auto& entry : ifiles) {
myfiles.push_back(path_canon(entry, &origcwd));
}
myfiles.sort();
@@ -229,7 +232,7 @@ bool ConfIndexer::indexFiles(list<string>& ifiles, int flag)
// Update index for specific documents. The docs come from an index
// query, so the udi, backend etc. fields are filled.
bool ConfIndexer::updateDocs(std::vector<Rcl::Doc> &docs, IxFlag flag)
bool ConfIndexer::updateDocs(vector<Rcl::Doc> &docs, IxFlag flag)
{
vector<string> paths;
docsToPaths(docs, paths);
@@ -240,13 +243,12 @@ bool ConfIndexer::updateDocs(std::vector<Rcl::Doc> &docs, IxFlag flag)
return true;
}
bool ConfIndexer::purgeFiles(std::list<string> &files, int flag)
bool ConfIndexer::purgeFiles(list<string> &files, int flag)
{
list<string> myfiles;
string origcwd = m_config->getOrigCwd();
for (list<string>::const_iterator it = files.begin();
it != files.end(); it++) {
myfiles.push_back(path_canon(*it, &origcwd));
for (const auto& entry : files) {
myfiles.push_back(path_canon(entry, &origcwd));
}
myfiles.sort();