cosmetics: list -> vector in more places

This commit is contained in:
Jean-Francois Dockes
2012-04-11 19:58:08 +02:00
parent 78bd8d63da
commit ec7b40a52e
44 changed files with 285 additions and 313 deletions
+9 -9
View File
@@ -130,7 +130,7 @@ bool FileInterner::getEnclosing(const string &url, const string &ipath,
// Uncompress input file into a temporary one, by executing the appropriate
// script.
static bool uncompressfile(RclConfig *conf, const string& ifn,
const list<string>& cmdv, TempDir& tdir,
const vector<string>& cmdv, TempDir& tdir,
string& tfile)
{
// Make sure tmp dir is empty. we guarantee this to filters
@@ -141,7 +141,7 @@ static bool uncompressfile(RclConfig *conf, const string& ifn,
string cmd = cmdv.front();
// Substitute file name and temp dir in command elements
list<string>::const_iterator it = cmdv.begin();
vector<string>::const_iterator it = cmdv.begin();
++it;
vector<string> args;
map<char, string> subs;
@@ -245,7 +245,7 @@ void FileInterner::init(const string &f, const struct stat *stp, RclConfig *cnf,
// Has mime: check for a compressed file. If so, create a
// temporary uncompressed file, and rerun the mime type
// identification, then do the rest with the temp file.
list<string>ucmd;
vector<string>ucmd;
if (m_cfg->getUncompressor(l_mime, ucmd)) {
// Check for compressed size limit
int maxkbs = -1;
@@ -541,10 +541,10 @@ bool FileInterner::dataToTempFile(const string& dt, const string& mt,
void FileInterner::checkExternalMissing(const string& msg, const string& mt)
{
if (m_missingdatap && msg.find("RECFILTERROR") == 0) {
list<string> lerr;
vector<string> lerr;
stringToStrings(msg, lerr);
if (lerr.size() > 2) {
list<string>::iterator it = lerr.begin();
vector<string>::iterator it = lerr.begin();
lerr.erase(it++);
if (*it == "HELPERNOTFOUND") {
lerr.erase(it++);
@@ -597,8 +597,8 @@ void FileInterner::getMissingFromDescription(FIMissingStore *st, const string& i
return;
// The "missing" file is text. Each line defines a missing filter
// and the list of mime types actually encountered that needed it (see method
// getMissingDescription())
// and the list of mime types actually encountered that needed it
// (see method getMissingDescription())
vector<string> lines;
stringToTokens(in, lines, "\n");
@@ -1125,7 +1125,7 @@ bool FileInterner::isCompressed(const string& fn, RclConfig *cnf)
return false;
}
list<string>ucmd;
vector<string> ucmd;
if (cnf->getUncompressor(l_mime, ucmd)) {
return true;
}
@@ -1149,7 +1149,7 @@ bool FileInterner::maybeUncompressToTemp(TempFile& temp, const string& fn,
return false;
}
list<string>ucmd;
vector<string>ucmd;
if (!cnf->getUncompressor(l_mime, ucmd)) {
return true;
}
+2 -2
View File
@@ -86,8 +86,8 @@ bool MimeHandlerExec::next_document()
// Command name
string cmd = params.front();
// Build parameter list: delete cmd name and add the file name
list<string>::iterator it = params.begin();
// Build parameter vector: delete cmd name and add the file name
vector<string>::iterator it = params.begin();
vector<string>myparams(++it, params.end());
myparams.push_back(m_fn);
if (!m_ipath.empty())
+4 -4
View File
@@ -18,8 +18,8 @@
#define _MH_EXEC_H_INCLUDED_
#include <string>
#include <list>
using std::list;
#include <vector>
using std::vector;
using std::string;
#include "mimehandler.h"
@@ -43,9 +43,9 @@ class MimeHandlerExec : public RecollFilter {
// (no use to try and execute over and over something that's not
// here).
// Parameter list: this has been built by our creator, from config file
// Parameters: this has been built by our creator, from config file
// data. We always add the file name at the end before actual execution
list<string> params;
vector<string> params;
// Filter output type. The default for ext. filters is to output html,
// but some don't, in which case the type is defined in the config.
string cfgFilterOutputMtype;
+1 -1
View File
@@ -51,7 +51,7 @@ bool MimeHandlerExecMultiple::startCmd()
string cmd = params.front();
// Build parameter list: delete cmd name
list<string>::iterator it = params.begin();
vector<string>::iterator it = params.begin();
vector<string>myparams(++it, params.end());
// Start filter
+2 -2
View File
@@ -51,11 +51,11 @@ MimeHandlerMail::MimeHandlerMail(RclConfig *cnf, const string &mt)
{
// Look for additional headers to be processed as per config:
list<string> hdrnames =
vector<string> hdrnames =
m_config->getFieldSectNames("mail");
if (hdrnames.empty())
return;
for (list<string>::const_iterator it = hdrnames.begin();
for (vector<string>::const_iterator it = hdrnames.begin();
it != hdrnames.end(); it++) {
(void)m_config->getFieldConfParam(*it, "mail", m_addProcdHdrs[*it]);
}