Commit b55cf4b3 authored by bonnell's avatar bonnell

Modified for-loops that loop on stl containers to use size_t instead of int...

Modified for-loops that loop on stl containers to use size_t instead of int for the loop variable, in order to remove signed/unsigned integer comparison compiler warnings

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@4160 18c085ea-50e0-402c-830e-de6fd14e8384
parent 4775e7e0
......@@ -110,7 +110,7 @@ InvalidFilesException::InvalidFilesException(const char *filename,
sprintf(str, "There was an error opening %s. It may be an "
"invalid file. VisIt tried using the following file format "
"readers to open the file: ", filename);
for (int i = 0 ; i < plugins.size() ; i++)
for (size_t i = 0 ; i < plugins.size() ; i++)
{
if (i != plugins.size()-1)
sprintf(strlen(str)+str, "%s, ", plugins[i].c_str());
......@@ -147,7 +147,7 @@ InvalidFilesException::InvalidFilesException(const char *filename,
sprintf(str, "There was an error opening %s. It may be an "
"invalid file. VisIt tried using the following file format "
"readers to open the file: ", filename);
for (int i = 0 ; i < plugins.size() ; i++)
for (size_t i = 0 ; i < plugins.size() ; i++)
{
if (i != plugins.size()-1)
sprintf(strlen(str)+str, "%s, ", plugins[i].c_str());
......
......@@ -1134,7 +1134,7 @@ RemoteProcess::Open(const std::string &rHost,
numRead, numWrite,
createAsThoughLocal);
debug5 << mName << "Creating the command line to use: (";
for(int i = 0; i < commandLine.size(); ++i)
for(size_t i = 0; i < commandLine.size(); ++i)
{
debug5 << commandLine[i].c_str();
if(i < commandLine.size()-1)
......@@ -1849,7 +1849,7 @@ RemoteProcess::CreateCommandLine(stringVector &args, const std::string &rHost,
//
// Add the program's additional arguments.
//
for(int i = 0; i < argList.size(); ++i)
for(size_t i = 0; i < argList.size(); ++i)
args.push_back(argList[i]);
......
......@@ -194,7 +194,7 @@ SocketConnection::Flush()
int count = 0;
// Write out the entire buffer, in pieces, to the socket descriptor.
for(int bufindex = 0; bufindex < buffer.size(); ++bufindex)
for(size_t bufindex = 0; bufindex < buffer.size(); ++bufindex)
{
buf[count++] = buffer[bufindex];
......
......@@ -270,7 +270,7 @@ ListExpr::ListExpr(const Pos &p, ListElemExpr *e) : ExprParseTreeNode(p)
ListExpr::~ListExpr()
{
for (int i=0; i<elems->size(); i++)
for (size_t i=0; i<elems->size(); i++)
{
delete (*elems)[i];
}
......@@ -287,7 +287,7 @@ void
ListExpr::PrintNode(ostream &o)
{
o << "List size="<<elems->size()<<":" << endl;
for (int i=0; i<elems->size(); i++)
for (size_t i=0; i<elems->size(); i++)
{
char tmp[256];
SNPRINTF(tmp, 256, "Element % 2d: ", i);
......@@ -342,7 +342,7 @@ ArgsExpr::ArgsExpr(const Pos &p, ArgExpr *e) : ExprParseTreeNode(p)
ArgsExpr::~ArgsExpr()
{
for (int i=0; i<args->size(); i++)
for (size_t i=0; i<args->size(); i++)
{
delete (*args)[i];
}
......@@ -359,7 +359,7 @@ void
ArgsExpr::PrintNode(ostream &o)
{
o << args->size()<<" arguments:" << endl;
for (int i=0; i<args->size(); i++)
for (size_t i=0; i<args->size(); i++)
{
char tmp[256];
SNPRINTF(tmp, 256, "Arg % 2d: ", i);
......@@ -401,7 +401,7 @@ FunctionExpr::GetVarLeaves()
std::vector<ArgExpr*> *a = args->GetArgs();
for (int i = 0; i < a->size(); i++)
for (size_t i = 0; i < a->size(); i++)
{
std::vector<std::string> vars = (*a)[i]->GetExpr()->GetVarLeaves();
......@@ -429,7 +429,7 @@ FunctionExpr::GetVarLeafNodes()
std::vector<ArgExpr*> *a = args->GetArgs();
for (int i = 0; i < a->size(); i++)
for (size_t i = 0; i < a->size(); i++)
{
std::set<ExprParseTreeNode *> vars = (*a)[i]->GetExpr()->GetVarLeafNodes();
......
......@@ -564,7 +564,7 @@ ExprParser::Parse(const std::string &s)
// Change weird spacing (tabs, newlines) to normal ones.
// This will make printing error messages later much easier.
for (int i=0; i<text.length(); i++)
for (size_t i=0; i<text.length(); i++)
if (text[i] == '\t' || text[i] == '\n') text[i] = ' ';
TRY
......
......@@ -400,7 +400,7 @@ int
DebugStream::DebugStreamBuf::overflow(int c)
{
curLevel = level;
for (int i=0; i<allBuffers.size(); i++)
for (size_t i=0; i<allBuffers.size(); i++)
allBuffers[i]->put(c);
return c;
}
......
......@@ -354,7 +354,7 @@ Init::Initialize(int &argc, char *argv[], int r, int n, bool strip, bool sigs)
void
Init::SetComponentName(const char *cname)
{
int len;
size_t len;
if (cname != 0 && (len = strlen(cname)) > 0)
{
......
......@@ -107,7 +107,7 @@ ConfiguratingItem::CreateClosure(const vector<const Rule*> &rules)
{
closurefollow.merge(follow);
}
for (int i=0; i<rules.size(); i++)
for (size_t i=0; i<rules.size(); i++)
{
if (s[0] == rules[i]->GetLHS())
{
......@@ -165,7 +165,7 @@ ostream &operator<<(ostream &o, const ConfiguratingItem &ci)
{
ci.rule->Print(o, ci.pos);
o << " \tfollow={ " << TermGreen;
for (int i = 0; i<ci.follow.size(); i++)
for (size_t i = 0; i<ci.follow.size(); i++)
{
if (ci.follow.set[i])
o << *(ci.follow.set[i]) << " ";
......
......@@ -65,12 +65,11 @@ ConfiguratingSet::operator==(const ConfiguratingSet &rhs) const
{
if (items.size() != rhs.items.size())
return false;
int n1 = items.size();
int n2 = rhs.items.size();
for (int i=0; i<n1; i++)
for (size_t i=0; i<items.size(); i++)
{
bool found = false;
for (int j=0; j<n2; j++)
for (size_t j=0; j<rhs.items.size(); j++)
{
if (items[i] == rhs.items[j])
{
......@@ -97,7 +96,7 @@ ConfiguratingSet::operator==(const ConfiguratingSet &rhs) const
void
ConfiguratingSet::Merge(const ConfiguratingSet &cs)
{
for (int i=0; i<cs.items.size(); i++)
for (size_t i=0; i<cs.items.size(); i++)
{
AddItem(cs.items[i]);
}
......@@ -116,7 +115,7 @@ ConfiguratingSet::Merge(const ConfiguratingSet &cs)
void
ConfiguratingSet::Close(const vector<const Rule*> &rules)
{
for (int i=0; i<items.size(); i++)
for (size_t i=0; i<items.size(); i++)
{
Merge(items[i].CreateClosure(rules));
}
......@@ -138,8 +137,7 @@ ConfiguratingSet::Close(const vector<const Rule*> &rules)
void
ConfiguratingSet::AddItem(const ConfiguratingItem &ci)
{
int n = items.size();
for (int i=0; i<n; i++)
for (size_t i=0; i<items.size(); i++)
{
if (items[i].CanMerge(ci))
{
......@@ -164,7 +162,7 @@ SymbolSet
ConfiguratingSet::GetShiftSymbols()
{
SymbolSet shiftsymbols;
for (int i=0; i<items.size(); i++)
for (size_t i=0; i<items.size(); i++)
{
if (! items[i].CanReduce())
shiftsymbols.insert(items[i].GetNextSymbol());
......@@ -186,7 +184,7 @@ SymbolSet
ConfiguratingSet::GetReduceSymbols()
{
SymbolSet reducesymbols;
for (int i=0; i<items.size(); i++)
for (size_t i=0; i<items.size(); i++)
{
if (items[i].CanReduce())
{
......@@ -210,7 +208,7 @@ ConfiguratingSet
ConfiguratingSet::GetShiftSet(const Symbol *s)
{
ConfiguratingSet cs;
for (int i=0; i<items.size(); i++)
for (size_t i=0; i<items.size(); i++)
{
if ((!items[i].CanReduce()) &&
(items[i].GetNextSymbol() == s))
......@@ -237,7 +235,7 @@ vector<int>
ConfiguratingSet::GetReduceRules(const Symbol *s)
{
vector<int> rr;
for (int i=0; i<items.size(); i++)
for (size_t i=0; i<items.size(); i++)
{
if (items[i].CanReduce() && items[i].GetFollow().contains(s))
rr.push_back(items[i].GetRule()->GetIndex());
......@@ -263,7 +261,7 @@ ConfiguratingSet::GetReduceRules(const Symbol *s)
ostream &
operator<<(ostream &o, const ConfiguratingSet &cs)
{
for (int i=0; i<cs.items.size(); i++)
for (size_t i=0; i<cs.items.size(); i++)
{
o << "\t";
//o << "(#"<<cs.items[i].GetRule().GetIndex()<<") ";
......
......@@ -80,7 +80,7 @@ Grammar::Grammar(Dictionary &d)
// ****************************************************************************
Grammar::~Grammar()
{
for (int i=1; i<rules.size(); i++)
for (size_t i=1; i<rules.size(); i++)
delete rules[i];
}
......@@ -113,12 +113,11 @@ Grammar::SetPrinter(ostream *o)
void
Grammar::Print(ostream &o)
{
int i;
o << endl << TermBold << TermBrown << "- - - ------------- rules ------------- - - -\n" << TermReset;
for (i=0; i<rules.size(); i++)
for (size_t i=0; i<rules.size(); i++)
o << *(rules[i]) << endl;
o << endl << TermBold << TermBrown << "- - - ------------- states ------------- - - -\n" << TermReset;
for (i=0; i<sets.size(); i++)
for (size_t i=0; i<sets.size(); i++)
{
if (sets[i].HasConflict()) o << TermRed;
else o << TermBold << TermBlue;
......@@ -282,13 +281,12 @@ Grammar::Configure()
sets.push_back(start);
// For every state in the grammar
for (int j=0; j<sets.size(); j++)
for (size_t j=0; j<sets.size(); j++)
{
// Add new states to the grammar resulting from shifting a symbol
// in the current state
int i;
SymbolSet shift = sets[j].GetShiftSymbols();
for (i=0; i<shift.size(); i++)
for (size_t i=0; i<shift.size(); i++)
{
const Symbol *ssym = shift.set[i];
if (!ssym)
......@@ -297,8 +295,8 @@ Grammar::Configure()
ConfiguratingSet cs = sets[j].GetShiftSet(ssym);
cs.Close(rules);
int match = sets.size();
for (int k=0; k<sets.size(); k++)
size_t match = sets.size();
for (size_t k=0; k<sets.size(); k++)
{
if (cs == sets[k])
{
......@@ -316,7 +314,7 @@ Grammar::Configure()
// Add the reduce rules for the current state, looking for
// and reduce-reduce conflicts
SymbolSet reduce = sets[j].GetReduceSymbols();
for (i=0; i<reduce.size(); i++)
for (size_t i=0; i<reduce.size(); i++)
{
const Symbol *rsym = reduce.set[i];
if (!rsym)
......@@ -330,7 +328,7 @@ Grammar::Configure()
// I never bothered since it never came up in our grammar
(*out) << TermRed << "Reduce-reduce conflict in state " << j
<< " for symbol " << *rsym << ":" << endl;
for (int k=0; k<reducerules.size(); k++)
for (size_t k=0; k<reducerules.size(); k++)
{
(*out) << TermRed << "\tRule "<<reducerules[k]<<": " << TermReset;
rules[reducerules[k]]->Print((*out));
......@@ -340,12 +338,12 @@ Grammar::Configure()
sets[j].SetConflict(true);
okay = false;
}
for (int k=0; k<reducerules.size(); k++)
for (size_t k=0; k<reducerules.size(); k++)
sets[j].SetReduceRule(rsym, reducerules[k]);
}
// Look for any shift-reduce conflicts
for (i=0; i<shift.size(); i++)
for (size_t i=0; i<shift.size(); i++)
{
const Symbol *ssym = shift.set[i];
if (!ssym || !reduce.set[i])
......@@ -397,7 +395,7 @@ Grammar::Configure()
// Create the states directly from the configurating sets
if (okay)
{
for (int i=0; i<sets.size(); i++)
for (size_t i=0; i<sets.size(); i++)
states.push_back(State(sets[i]));
}
......@@ -438,8 +436,6 @@ Grammar::Configure()
void
Grammar::WriteStateInitialization(const string &name, ostream &o)
{
int i;
o << "/*****************************************************************************" << endl;
o << "*" << endl;
o << "* Copyright (c) 2000 - 2008, Lawrence Livermore National Security, LLC" << endl;
......@@ -497,7 +493,7 @@ Grammar::WriteStateInitialization(const string &name, ostream &o)
o << "}" << endl;
o << "" << endl;
for (i=0; i<states.size(); i++)
for (size_t i=0; i<states.size(); i++)
{
o << "static void InitState_"<<i<<"(Dictionary &d, State &s)" << endl;
o << "{" << endl;
......@@ -575,7 +571,7 @@ Grammar::WriteStateInitialization(const string &name, ostream &o)
o << "{" << endl;
o << " states.resize(" << states.size() << ");" << endl;
o << endl;
for (i=0; i<states.size(); i++)
for (size_t i=0; i<states.size(); i++)
{
o << " InitState_"<<i<<"(dictionary, states[" << i << "]);" << endl;
}
......
......@@ -210,8 +210,8 @@ void
Parser::PrintState(ostream &o)
{
#ifdef DEBUG
//o << "state= "; for (int i=0; i<states.size(); i++) o << states[i] << " "; o << endl;
o << "stack= "; for (int i=0; i<elems.size(); i++) o << *(elems[i].sym) << " "; o << endl;
//o << "state= "; for (size_t i=0; i<states.size(); i++) o << states[i] << " "; o << endl;
o << "stack= "; for (size_t i=0; i<elems.size(); i++) o << *(elems[i].sym) << " "; o << endl;
#endif
}
......
......@@ -109,7 +109,8 @@ class PARSER_API Pos
std::string GetText(const std::string &s) const
{
std::string msg = "";
if (s.length() < p1 || s.length() < p2 || p1 < 0)
int slen = s.length();
if (slen < p1 || slen < p2 || p1 < 0)
return msg;
msg = s.substr(p1, p2-p1+1);
return msg;
......
......@@ -122,7 +122,7 @@ Sequence::Print(ostream &o, int pos) const
}
else
{
for (int i=0; i<symbols.size(); i++)
for (size_t i=0; i<symbols.size(); i++)
{
if (pos == i) o << dot.c_str() << " ";
o << *(symbols[i]) << " ";
......@@ -147,13 +147,12 @@ Sequence::IsNullable(const vector<const Rule*> &rules) const
if (symbols.empty())
return true;
int i;
for (i=0; i<symbols.size(); i++)
for (size_t i=0; i<symbols.size(); i++)
if (symbols[i]->IsTerminal())
return false;
bool nullable = true;
for (i=0; i<symbols.size() && nullable; i++)
for (size_t i=0; i<symbols.size() && nullable; i++)
{
nullable = symbols[i]->IsNullable(rules);
}
......@@ -174,8 +173,7 @@ SymbolSet
Sequence::GetFirstSet(const vector<const Rule*> &rules) const
{
SymbolSet first;
int i;
for (i=0; i<symbols.size(); i++)
for (size_t i=0; i<symbols.size(); i++)
{
if (symbols[i]->IsTerminal())
{
......@@ -240,7 +238,7 @@ Sequence
Sequence::GetSubsequence(int pos) const
{
Sequence s;
for (int i=pos; i<symbols.size(); i++)
for (size_t i=pos; i<symbols.size(); i++)
s.AddSymbol(*symbols[i]);
return s;
}
......@@ -259,7 +257,7 @@ const Symbol*
Sequence::GetLastTerminal() const
{
const Symbol *nt = NULL;
for (int i=0; i<symbols.size(); i++)
for (size_t i=0; i<symbols.size(); i++)
if (symbols[i]->IsTerminal())
nt = symbols[i];
return nt;
......
......@@ -153,7 +153,7 @@ Symbol::IsNullable(const vector<const Rule*> &rules) const
if (type == Terminal)
return false;
for (int i=0; i<rules.size(); i++)
for (size_t i=0; i<rules.size(); i++)
{
if (rules[i]->GetLHS() == this)
{
......@@ -185,7 +185,7 @@ Symbol::GetFirstSet(const vector<const Rule*> &rules) const
}
else
{
for (int i=0; i<rules.size(); i++)
for (size_t i=0; i<rules.size(); i++)
{
if (rules[i]->GetLHS() == this &&
// Try to avoid infinite recursion -- this should be improved!
......
......@@ -64,7 +64,7 @@ struct PARSER_API SymbolSet
{
memset(set, 0, sizeof(const Symbol*)*MAXSYMBOLS);
}
int size() const
size_t size() const
{
return MAXSYMBOLS;
}
......
......@@ -356,7 +356,7 @@ DatabasePluginManager::LoadMDServerPluginInfo()
void
DatabasePluginManager::FreeCommonPluginInfo()
{
for (int i=0; i<commonPluginInfo.size(); i++)
for (size_t i=0; i<commonPluginInfo.size(); i++)
delete commonPluginInfo[i];
commonPluginInfo.clear();
}
......@@ -383,7 +383,7 @@ DatabasePluginManager::ReloadPlugins()
vector<CommonDatabasePluginInfo*> new_commonPluginInfo;
loadedindexmap.clear();
for (int i=0; i<loadedhandles.size(); i++)
for (size_t i=0; i<loadedhandles.size(); i++)
{
if (enabled[allindexmap[commonPluginInfo[i]->GetID()]])
{
......
......@@ -465,7 +465,7 @@ OperatorPluginManager::LoadScriptingPluginInfo()
void
OperatorPluginManager::FreeCommonPluginInfo()
{
for (int i=0; i<commonPluginInfo.size(); i++)
for (size_t i=0; i<commonPluginInfo.size(); i++)
delete commonPluginInfo[i];
commonPluginInfo.clear();
}
......@@ -486,7 +486,7 @@ OperatorPluginManager::FreeCommonPluginInfo()
void
OperatorPluginManager::FreeGUIPluginInfo()
{
for (int i=0; i<guiPluginInfo.size(); i++)
for (size_t i=0; i<guiPluginInfo.size(); i++)
delete guiPluginInfo[i];
guiPluginInfo.clear();
}
......@@ -507,7 +507,7 @@ OperatorPluginManager::FreeGUIPluginInfo()
void
OperatorPluginManager::FreeViewerPluginInfo()
{
for (int i=0; i<viewerPluginInfo.size(); i++)
for (size_t i=0; i<viewerPluginInfo.size(); i++)
delete viewerPluginInfo[i];
viewerPluginInfo.clear();
}
......@@ -528,7 +528,7 @@ OperatorPluginManager::FreeViewerPluginInfo()
void
OperatorPluginManager::FreeEnginePluginInfo()
{
for (int i=0; i<enginePluginInfo.size(); i++)
for (size_t i=0; i<enginePluginInfo.size(); i++)
delete enginePluginInfo[i];
enginePluginInfo.clear();
}
......@@ -549,7 +549,7 @@ OperatorPluginManager::FreeEnginePluginInfo()
void
OperatorPluginManager::FreeScriptingPluginInfo()
{
for (int i=0; i<scriptingPluginInfo.size(); i++)
for (size_t i=0; i<scriptingPluginInfo.size(); i++)
delete scriptingPluginInfo[i];
scriptingPluginInfo.clear();
}
......@@ -586,7 +586,7 @@ OperatorPluginManager::ReloadPlugins()
vector<ScriptingOperatorPluginInfo*> new_scriptingPluginInfo;
loadedindexmap.clear();
for (int i=0; i<loadedhandles.size(); i++)
for (size_t i=0; i<loadedhandles.size(); i++)
{
if (enabled[allindexmap[commonPluginInfo[i]->GetID()]])
{
......
......@@ -465,7 +465,7 @@ PlotPluginManager::LoadScriptingPluginInfo()
void
PlotPluginManager::FreeCommonPluginInfo()
{
for (int i=0; i<commonPluginInfo.size(); i++)
for (size_t i=0; i<commonPluginInfo.size(); i++)
delete commonPluginInfo[i];
commonPluginInfo.clear();
}
......@@ -486,7 +486,7 @@ PlotPluginManager::FreeCommonPluginInfo()
void
PlotPluginManager::FreeGUIPluginInfo()
{
for (int i=0; i<guiPluginInfo.size(); i++)
for (size_t i=0; i<guiPluginInfo.size(); i++)
delete guiPluginInfo[i];
guiPluginInfo.clear();
}
......@@ -507,7 +507,7 @@ PlotPluginManager::FreeGUIPluginInfo()
void
PlotPluginManager::FreeViewerPluginInfo()
{
for (int i=0; i<viewerPluginInfo.size(); i++)
for (size_t i=0; i<viewerPluginInfo.size(); i++)
delete viewerPluginInfo[i];
viewerPluginInfo.clear();
}
......@@ -528,7 +528,7 @@ PlotPluginManager::FreeViewerPluginInfo()
void
PlotPluginManager::FreeEnginePluginInfo()
{
for (int i=0; i<enginePluginInfo.size(); i++)
for (size_t i=0; i<enginePluginInfo.size(); i++)
delete enginePluginInfo[i];
enginePluginInfo.clear();
}
......@@ -549,7 +549,7 @@ PlotPluginManager::FreeEnginePluginInfo()
void
PlotPluginManager::FreeScriptingPluginInfo()
{
for (int i=0; i<scriptingPluginInfo.size(); i++)
for (size_t i=0; i<scriptingPluginInfo.size(); i++)
delete scriptingPluginInfo[i];
scriptingPluginInfo.clear();
}
......@@ -586,7 +586,7 @@ PlotPluginManager::ReloadPlugins()
vector<ScriptingPlotPluginInfo*> new_scriptingPluginInfo;
loadedindexmap.clear();
for (int i=0; i<loadedhandles.size(); i++)
for (size_t i=0; i<loadedhandles.size(); i++)
{
if (enabled[allindexmap[commonPluginInfo[i]->GetID()]])
{
......
......@@ -495,8 +495,6 @@ PluginManager::EnablePlugin(const string &id)
void
PluginManager::GetPluginList(vector<pair<string,string> > &libs)
{
int dir, f;
// Read the files in the plugin directory.
vector< vector<pair<string,string> > > files;
ReadPluginDir(files);
......@@ -507,9 +505,9 @@ PluginManager::GetPluginList(vector<pair<string,string> > &libs)
vector< vector<pair<string,string> > > tmp;
tmp.resize(files.size());
for (dir = 0 ; dir < files.size() ; dir++)
for (size_t dir = 0 ; dir < files.size() ; dir++)
{
for (f = 0; f < files[dir].size(); f++)
for (size_t f = 0; f < files[dir].size(); f++)
{
const string &filename = files[dir][f].second;
......@@ -534,10 +532,10 @@ PluginManager::GetPluginList(vector<pair<string,string> > &libs)
// Sort the file names, but keep the precedence of the directory
// they came from preserved.
for (dir = 0 ; dir < tmp.size() ; dir++)
for (size_t dir = 0 ; dir < tmp.size() ; dir++)
{
sort(tmp[dir].begin(), tmp[dir].end());
for (f = 0 ; f < tmp[dir].size() ; f++)
for (size_t f = 0 ; f < tmp[dir].size() ; f++)
libs.push_back(tmp[dir][f]);
}
}
......@@ -612,7 +610,7 @@ PluginManager::ReadPluginInfo()
string ext(PLUGIN_EXTENSION);
vector<string> alreadyLoaded;
vector<string> alreadyLoadedDir;
for (int i=0; i<libs.size(); i++)
for (size_t i=0; i<libs.size(); i++)
{
const string &dirname = libs[i].first;
const string &filename = libs[i].second;
......@@ -635,8 +633,7 @@ PluginManager::ReadPluginInfo()
break;
}
bool match = false;
int j;
for (j=0; j<libs.size() && !match; j++)
for (size_t j=0; j<libs.size() && !match; j++)
{
if (libs[i].first == dirname &&
libs[j].second == str)
......@@ -648,7 +645,7 @@ PluginManager::ReadPluginInfo()
// see if this plugin has already been loaded, presumably because
// we loaded a private one and now we're considering the installed
// version.
for (j = 0 ; j < alreadyLoaded.size() ; j++)
for (size_t j = 0 ; j < alreadyLoaded.size() ; j++)
{
if (filename == alreadyLoaded[j])
{
......@@ -699,7 +696,7 @@ PluginManager::ReadPluginInfo()
pluginInitErrors += "The following plugins were built with an old "
"version of VisIt. Please either rebuild the plugins associated "
"with these files or delete them:\n";
for (int i=0; i<pluginsWithWrongVersion.size(); i++)
for (size_t i=0; i<pluginsWithWrongVersion.size(); i++)
{
string pluginFile(pluginsWithWrongVersion[i]);
string ext(PLUGIN_EXTENSION);
......@@ -715,7 +712,7 @@ PluginManager::ReadPluginInfo()
pluginInitErrors += string(" the ")+pluginPrefix+
" plugin in the directory "+dirname+"\n";
for (int j = 0 ; j < alreadyLoaded.size() ; j++)
for (size_t j = 0 ; j < alreadyLoaded.size() ; j++)
{
if (alreadyLoaded[j] == pluginlib)
pluginInitErrors += string("\t(Note that the plugin from ")
......@@ -733,7 +730,7 @@ PluginManager::ReadPluginInfo()
"with an old version of VisIt. Please either regenerate the "
"plugin info files by running xml2info and rebuild them, or else "
"simply delete them:\n";
for (int i=0; i<pluginsWithNoVersion.size(); i++)
for (size_t i=0; i<pluginsWithNoVersion.size(); i++)
{
string pluginFile(pluginsWithNoVersion[i]);
string ext(PLUGIN_EXTENSION);
......@@ -798,7 +795,7 @@ PluginManager::IsGeneralPlugin(const string &pluginFile) const
void
PluginManager::LoadPluginsNow()
{
for (int i=0; i<libfiles.size(); i++)
for (size_t i=0; i<libfiles.size(); i++)
{
LoadSinglePlugin(i);
}
......@@ -979,8 +976,6 @@ PluginManager::LoadPluginsOnDemand()
void
PluginManager::UnloadPlugins()
{
int i;
FreeCommonPluginInfo();
FreeGUIPluginInfo();
FreeViewerPluginInfo();
......@@ -989,7 +984,7 @@ PluginManager::UnloadPlugins()
FreeScriptingPluginInfo();
// Close the plugins.
for (i=0; i < loadedhandles.size(); i++)
for (size_t i=0; i < loadedhandles.size(); i++)
{
handle = loadedhandles[i];
PluginClose();
......@@ -1053,7 +1048,7 @@ PluginManager::GetAllIndex(const string &id) const
// Look through the entire list of plugins for the specified name.
//
int pluginTypeIndex = -1;
for(int i = 0; i < ids.size(); ++i)
for(size_t i = 0; i < ids.size(); ++i)
{
if(id == ids[i])
{
......@@ -1093,7 +1088,7 @@ PluginManager::GetAllIndexFromName(const string &name) const
// Look through the entire list of plugins for the specified name.
//
int pluginTypeIndex = -1;
for(int i = 0; i < names.size(); ++i)
for(size_t i = 0; i < names.size(); ++i)
{
if(name == names[i])
{
......@@ -1518,7 +1513,7 @@ void
PluginManager::ReadPluginDir(vector< vector<pair<string,string> > > &files)
{
files.resize(pluginDirs.size());
for (int i=0; i<pluginDirs.size(); i++)
for (size_t i=0; i<pluginDirs.size(); i++)
{