make stringtotokens use vector

This commit is contained in:
Jean-Francois Dockes
2010-09-13 14:17:22 +02:00
parent c4a818fc64
commit e327ea0b4e
10 changed files with 23 additions and 28 deletions
+2 -2
View File
@@ -98,9 +98,9 @@ bool ExecCmd::which(const string& cmd, string& exepath, const char* path)
if (pp == 0)
return false;
list<string> pels;
vector<string> pels;
stringToTokens(pp, pels, ":");
for (list<string>::iterator it = pels.begin(); it != pels.end(); it++) {
for (vector<string>::iterator it = pels.begin(); it != pels.end(); it++) {
if (it->empty())
*it = ".";
string candidate = (it->empty() ? string(".") : *it) + "/" + cmd;