Commit 912c1737 authored by bonnell's avatar bonnell

Remove warnings from MetaData code files and regenerate their atts

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@21619 18c085ea-50e0-402c-830e-de6fd14e8384
parent c0b0505d
......@@ -1739,7 +1739,7 @@ avtDatabaseMetaData::RemoveMeshes(int index)
int
avtDatabaseMetaData::GetNumMeshes() const
{
return meshes.size();
return (int)meshes.size();
}
// ****************************************************************************
......@@ -1890,7 +1890,7 @@ avtDatabaseMetaData::RemoveSubsets(int index)
int
avtDatabaseMetaData::GetNumSubsets() const
{
return subsets.size();
return (int)subsets.size();
}
// ****************************************************************************
......@@ -2041,7 +2041,7 @@ avtDatabaseMetaData::RemoveScalars(int index)
int
avtDatabaseMetaData::GetNumScalars() const
{
return scalars.size();
return (int)scalars.size();
}
// ****************************************************************************
......@@ -2192,7 +2192,7 @@ avtDatabaseMetaData::RemoveVectors(int index)
int
avtDatabaseMetaData::GetNumVectors() const
{
return vectors.size();
return (int)vectors.size();
}
// ****************************************************************************
......@@ -2343,7 +2343,7 @@ avtDatabaseMetaData::RemoveTensors(int index)
int
avtDatabaseMetaData::GetNumTensors() const
{
return tensors.size();
return (int)tensors.size();
}
// ****************************************************************************
......@@ -2494,7 +2494,7 @@ avtDatabaseMetaData::RemoveSymmTensors(int index)
int
avtDatabaseMetaData::GetNumSymmTensors() const
{
return symmTensors.size();
return (int)symmTensors.size();
}
// ****************************************************************************
......@@ -2645,7 +2645,7 @@ avtDatabaseMetaData::RemoveArrays(int index)
int
avtDatabaseMetaData::GetNumArrays() const
{
return arrays.size();
return (int)arrays.size();
}
// ****************************************************************************
......@@ -2796,7 +2796,7 @@ avtDatabaseMetaData::RemoveMaterials(int index)
int
avtDatabaseMetaData::GetNumMaterials() const
{
return materials.size();
return (int)materials.size();
}
// ****************************************************************************
......@@ -2947,7 +2947,7 @@ avtDatabaseMetaData::RemoveSpecies(int index)
int
avtDatabaseMetaData::GetNumSpecies() const
{
return species.size();
return (int)species.size();
}
// ****************************************************************************
......@@ -3098,7 +3098,7 @@ avtDatabaseMetaData::RemoveCurves(int index)
int
avtDatabaseMetaData::GetNumCurves() const
{
return curves.size();
return (int)curves.size();
}
// ****************************************************************************
......@@ -3249,7 +3249,7 @@ avtDatabaseMetaData::RemoveLabels(int index)
int
avtDatabaseMetaData::GetNumLabels() const
{
return labels.size();
return (int)labels.size();
}
// ****************************************************************************
......@@ -3400,7 +3400,7 @@ avtDatabaseMetaData::RemoveDefaultPlots(int index)
int
avtDatabaseMetaData::GetNumDefaultPlots() const
{
return defaultPlots.size();
return (int)defaultPlots.size();
}
// ****************************************************************************
......@@ -3494,7 +3494,7 @@ avtDatabaseMetaData::SetTemporalExtents(double min, double max)
void
avtDatabaseMetaData::SetCycle(int ts, int c)
{
if(ts >= 0 && ts < cyclesAreAccurate.size())
if(ts >= 0 && ts < (int)cyclesAreAccurate.size())
{
cycles[ts] = c;
cyclesAreAccurate[ts] = true;
......@@ -3519,7 +3519,7 @@ avtDatabaseMetaData::SetCycle(int ts, int c)
void
avtDatabaseMetaData::SetCycleIsAccurate(bool b, int ts)
{
if(ts >= 0 && ts < cyclesAreAccurate.size())
if(ts >= 0 && ts < (int)cyclesAreAccurate.size())
cyclesAreAccurate[ts] = (b ? 1 : 0);
}
......@@ -3565,7 +3565,7 @@ avtDatabaseMetaData::SetCyclesAreAccurate(bool b)
bool
avtDatabaseMetaData::IsCycleAccurate(int ts) const
{
if(ts >= 0 && ts < cyclesAreAccurate.size())
if(ts >= 0 && ts < (int)cyclesAreAccurate.size())
return (cyclesAreAccurate[ts] != 0 ? true : false);
return false;
}
......@@ -3592,7 +3592,7 @@ avtDatabaseMetaData::AreAllCyclesAccurateAndValid(int expectedNumStates) const
{
int useNumStates = expectedNumStates == -1 ? numStates : expectedNumStates;
if (cyclesAreAccurate.size() != useNumStates)
if ((int)cyclesAreAccurate.size() != useNumStates)
return false;
if (cyclesAreAccurate.size() != cycles.size())
......@@ -3625,7 +3625,7 @@ avtDatabaseMetaData::AreAllCyclesAccurateAndValid(int expectedNumStates) const
void
avtDatabaseMetaData::SetTime(int ts, double t)
{
if(ts >= 0 && ts < timesAreAccurate.size())
if(ts >= 0 && ts < (int)timesAreAccurate.size())
{
times[ts] = t;
timesAreAccurate[ts] = true;
......@@ -3650,7 +3650,7 @@ avtDatabaseMetaData::SetTime(int ts, double t)
void
avtDatabaseMetaData::SetTimeIsAccurate(bool b, int ts)
{
if(ts >= 0 && ts < timesAreAccurate.size())
if(ts >= 0 && ts < (int)timesAreAccurate.size())
timesAreAccurate[ts] = (b ? 1 : 0);
}
......@@ -3696,7 +3696,7 @@ avtDatabaseMetaData::SetTimesAreAccurate(bool b)
bool
avtDatabaseMetaData::IsTimeAccurate(int ts) const
{
if(ts >= 0 && ts < timesAreAccurate.size())
if(ts >= 0 && ts < (int)timesAreAccurate.size())
return timesAreAccurate[ts] != 0;
return false;
}
......@@ -3722,7 +3722,7 @@ avtDatabaseMetaData::AreAllTimesAccurateAndValid(int expectedNumStates) const
{
int useNumStates = expectedNumStates == -1 ? numStates : expectedNumStates;
if (timesAreAccurate.size() != useNumStates)
if ((int)timesAreAccurate.size() != useNumStates)
return false;
if (timesAreAccurate.size() != times.size())
......@@ -3778,9 +3778,9 @@ static bool IsForbidden(std::string &origName, std::string &newName,
bool shouldReplace = false;
char new_name[1024];
const char *orig_name = origName.c_str();
int len = strlen(orig_name);
int cur = 0;
for (int i = 0 ; i < len ; i++)
size_t len = strlen(orig_name);
size_t cur = 0;
for (size_t i = 0 ; i < len ; i++)
{
bool hadBadChar = false;
for (size_t j = 0 ; j < badChars.size() ; j++)
......@@ -3789,8 +3789,8 @@ static bool IsForbidden(std::string &origName, std::string &newName,
{
hadBadChar = true;
const char *replacement = newStr[j].c_str();
int len2 = strlen(replacement);
for (int k = 0 ; k < len2 ; k++)
size_t len2 = strlen(replacement);
for (size_t k = 0 ; k < len2 ; k++)
{
new_name[cur++] = replacement[k];
}
......@@ -5194,7 +5194,7 @@ avtDatabaseMetaData::ConvertCSGDomainToBlockAndRegion(const char *const var,
if (mmd && mmd->meshType == AVT_CSG_MESH)
{
const intVector& groupIds = mmd->groupIds;
if (groupIds.size() > domainAsVisItSeesIt)
if ((int)groupIds.size() > domainAsVisItSeesIt)
{
int i, j = groupIds[domainAsVisItSeesIt];
for (i = domainAsVisItSeesIt; i >= 0 && groupIds[i] == j; i--)
......
......@@ -135,7 +135,7 @@ Definition:
void
avtDatabaseMetaData::SetCycle(int ts, int c)
{
if(ts >= 0 && ts < cyclesAreAccurate.size())
if(ts >= 0 && ts < (int)cyclesAreAccurate.size())
{
cycles[ts] = c;
cyclesAreAccurate[ts] = true;
......@@ -163,7 +163,7 @@ Definition:
void
avtDatabaseMetaData::SetCycleIsAccurate(bool b, int ts)
{
if(ts >= 0 && ts < cyclesAreAccurate.size())
if(ts >= 0 && ts < (int)cyclesAreAccurate.size())
cyclesAreAccurate[ts] = (b ? 1 : 0);
}
......@@ -215,7 +215,7 @@ Definition:
bool
avtDatabaseMetaData::IsCycleAccurate(int ts) const
{
if(ts >= 0 && ts < cyclesAreAccurate.size())
if(ts >= 0 && ts < (int)cyclesAreAccurate.size())
return (cyclesAreAccurate[ts] != 0 ? true : false);
return false;
}
......@@ -245,7 +245,7 @@ avtDatabaseMetaData::AreAllCyclesAccurateAndValid(int expectedNumStates) const
{
int useNumStates = expectedNumStates == -1 ? numStates : expectedNumStates;
if (cyclesAreAccurate.size() != useNumStates)
if ((int)cyclesAreAccurate.size() != useNumStates)
return false;
if (cyclesAreAccurate.size() != cycles.size())
......@@ -281,7 +281,7 @@ Definition:
void
avtDatabaseMetaData::SetTime(int ts, double t)
{
if(ts >= 0 && ts < timesAreAccurate.size())
if(ts >= 0 && ts < (int)timesAreAccurate.size())
{
times[ts] = t;
timesAreAccurate[ts] = true;
......@@ -309,7 +309,7 @@ Definition:
void
avtDatabaseMetaData::SetTimeIsAccurate(bool b, int ts)
{
if(ts >= 0 && ts < timesAreAccurate.size())
if(ts >= 0 && ts < (int)timesAreAccurate.size())
timesAreAccurate[ts] = (b ? 1 : 0);
}
......@@ -361,7 +361,7 @@ Definition:
bool
avtDatabaseMetaData::IsTimeAccurate(int ts) const
{
if(ts >= 0 && ts < timesAreAccurate.size())
if(ts >= 0 && ts < (int)timesAreAccurate.size())
return timesAreAccurate[ts] != 0;
return false;
}
......@@ -390,7 +390,7 @@ avtDatabaseMetaData::AreAllTimesAccurateAndValid(int expectedNumStates) const
{
int useNumStates = expectedNumStates == -1 ? numStates : expectedNumStates;
if (timesAreAccurate.size() != useNumStates)
if ((int)timesAreAccurate.size() != useNumStates)
return false;
if (timesAreAccurate.size() != times.size())
......@@ -449,9 +449,9 @@ static bool IsForbidden(std::string &origName, std::string &newName,
bool shouldReplace = false;
char new_name[1024];
const char *orig_name = origName.c_str();
int len = strlen(orig_name);
int cur = 0;
for (int i = 0 ; i < len ; i++)
size_t len = strlen(orig_name);
size_t cur = 0;
for (size_t i = 0 ; i < len ; i++)
{
bool hadBadChar = false;
for (size_t j = 0 ; j < badChars.size() ; j++)
......@@ -460,8 +460,8 @@ static bool IsForbidden(std::string &origName, std::string &newName,
{
hadBadChar = true;
const char *replacement = newStr[j].c_str();
int len2 = strlen(replacement);
for (int k = 0 ; k < len2 ; k++)
size_t len2 = strlen(replacement);
for (size_t k = 0 ; k < len2 ; k++)
{
new_name[cur++] = replacement[k];
}
......@@ -2000,7 +2000,7 @@ avtDatabaseMetaData::ConvertCSGDomainToBlockAndRegion(const char *const var,
if (mmd && mmd->meshType == AVT_CSG_MESH)
{
const intVector& groupIds = mmd->groupIds;
if (groupIds.size() > domainAsVisItSeesIt)
if ((int)groupIds.size() > domainAsVisItSeesIt)
{
int i, j = groupIds[domainAsVisItSeesIt];
for (i = domainAsVisItSeesIt; i >= 0 && groupIds[i] == j; i--)
......@@ -3328,13 +3328,11 @@ Definition:
bool
avtDatabaseMetaData::VarIsCompound(const std::string &v) const
{
int beg = -1, end = -1;
// find the mesh name enclosed in parentheses
beg = v.find('(');
end = v.find(')');
size_t beg = v.find('(');
size_t end = v.find(')');
if (beg == -1 || end == -1)
if (beg == std::string::npos || end == std::string::npos)
{
return false;
}
......@@ -3423,13 +3421,11 @@ void
avtDatabaseMetaData::ParseCompoundForMesh(const std::string &inVar,
std::string &outVar) const
{
int beg = -1, end = -1;
// find the mesh name enclosed in parentheses
beg = inVar.find('(');
end = inVar.find(')');
size_t beg = inVar.find('(');
size_t end = inVar.find(')');
if (beg == -1 || end == -1)
if (beg == std::string::npos || end == std::string::npos)
{
// this is not a parseable variable.
outVar = inVar;
......@@ -3468,13 +3464,11 @@ void
avtDatabaseMetaData::ParseCompoundForCategory(const std::string &inVar,
std::string &outVar) const
{
int end = -1, beg = -1;
// find the mesh name enclosed in parentheses
beg = inVar.find('(');
end = inVar.find(')');
size_t beg = inVar.find('(');
size_t end = inVar.find(')');
if (beg == -1 || end == -1)
if (beg == std::string::npos || end == std::string::npos)
{
// this is not a compound variable.
outVar = inVar;
......
......@@ -1287,7 +1287,7 @@ avtMeshMetaData::Print(ostream &out, int indent) const
}
if (blockNames.size() == numBlocks)
if ((int)blockNames.size() == numBlocks)
{
Indent(out, indent);
out << "Block names: " << std::endl;
......@@ -1416,7 +1416,7 @@ avtMeshMetaData::SetAMRInfo(const std::string &levelName,
const std::vector<int> &patchesPerLevel)
{
int i;
int nlevels = patchesPerLevel.size();
int nlevels = (int)patchesPerLevel.size();
// Basic setup stuff
int numBlocks = 0;
......
......@@ -651,7 +651,7 @@ avtMeshMetaData::Print(ostream &out, int indent) const
}
if (blockNames.size() == numBlocks)
if ((int)blockNames.size() == numBlocks)
{
Indent(out, indent);
out << "Block names: " << std::endl;
......@@ -783,7 +783,7 @@ avtMeshMetaData::SetAMRInfo(const std::string &levelName,
const std::vector<int> &patchesPerLevel)
{
int i;
int nlevels = patchesPerLevel.size();
int nlevels = (int)patchesPerLevel.size();
// Basic setup stuff
int numBlocks = 0;
......
......@@ -868,7 +868,7 @@ avtScalarMetaData::AddEnumNameValue(std::string name, double val)
enumRanges.push_back(val);
enumRanges.push_back(val);
return enumNames.size() - 1;
return (int)enumNames.size() - 1;
}
// ****************************************************************************
......@@ -891,7 +891,7 @@ avtScalarMetaData::AddEnumNameRange(std::string name, double min, double max)
enumRanges.push_back(min);
enumRanges.push_back(max);
return enumNames.size() - 1;
return (int)enumNames.size() - 1;
}
// ****************************************************************************
......
......@@ -213,7 +213,7 @@ avtScalarMetaData::AddEnumNameValue(std::string name, double val)
enumRanges.push_back(val);
enumRanges.push_back(val);
return enumNames.size() - 1;
return (int)enumNames.size() - 1;
}
Function: AddEnumNameRange
......@@ -239,7 +239,7 @@ avtScalarMetaData::AddEnumNameRange(std::string name, double min, double max)
enumRanges.push_back(min);
enumRanges.push_back(max);
return enumNames.size() - 1;
return (int)enumNames.size() - 1;
}
Function: SetEnumAlwaysExcludeValue
......@@ -407,7 +407,7 @@ avtScalarMetaData::ComboValFromDigits(const std::vector<std::vector<int> > &ptMa
int row, col;
*id = 0.0;
std::list<int>::const_reverse_iterator it;
for (col = digits.size()-1, it = digits.rbegin(); col >= 0; col--, it++)
for (col = (int)digits.size()-1, it = digits.rbegin(); col >= 0; col--, it++)
{
for (row = 0; row <= *it; row++)
*id += ptMap[row][col];
......
......@@ -816,7 +816,7 @@ avtSimulationInformation::RemoveGenericCommands(int index)
int
avtSimulationInformation::GetNumGenericCommands() const
{
return static_cast<int>(genericCommands.size());
return (int)genericCommands.size();
}
// ****************************************************************************
......@@ -967,7 +967,7 @@ avtSimulationInformation::RemoveCustomCommands(int index)
int
avtSimulationInformation::GetNumCustomCommands() const
{
return static_cast<int>(customCommands.size());
return (int)customCommands.size();
}
// ****************************************************************************
......
......@@ -597,7 +597,7 @@ avtSpeciesMetaData::RemoveSpecies(int index)
int
avtSpeciesMetaData::GetNumSpecies() const
{
return static_cast<int>(species.size());
return (int)species.size();
}
// ****************************************************************************
......
......@@ -665,7 +665,7 @@ avtSubsetsMetaData::GetFieldName(int index) const
case ID_hasPartialCells: return "hasPartialCells";
case ID_decompMode: return "decompMode";
case ID_maxTopoDim: return "maxTopoDim";
default: return "invalid index";
default: return avtVarMetaData::GetFieldName(index);
}
}
......@@ -701,7 +701,7 @@ avtSubsetsMetaData::GetFieldType(int index) const
case ID_hasPartialCells: return FieldType_bool;
case ID_decompMode: return FieldType_enum;
case ID_maxTopoDim: return FieldType_int;
default: return FieldType_unknown;
default: return avtVarMetaData::GetFieldType(index);
}
}
......@@ -737,7 +737,7 @@ avtSubsetsMetaData::GetFieldTypeName(int index) const
case ID_hasPartialCells: return "bool";
case ID_decompMode: return "enum";
case ID_maxTopoDim: return "int";
default: return "invalid index";
default: return avtVarMetaData::GetFieldTypeName(index);
}
}
......@@ -823,7 +823,7 @@ avtSubsetsMetaData::FieldsEqual(int index_, const AttributeGroup *rhs) const
retval = (maxTopoDim == obj.maxTopoDim);
}
break;
default: retval = false;
default: retval = avtVarMetaData::FieldsEqual(index_, rhs);
}
return retval;
......@@ -853,8 +853,6 @@ Indent(ostream &out, int indent)
void
avtSubsetsMetaData::Print(ostream &out, int indent) const
{
size_t i;
avtVarMetaData::Print(out, indent);
Indent(out, indent);
......@@ -891,11 +889,11 @@ avtSubsetsMetaData::Print(ostream &out, int indent) const
{
Indent(out, indent);
out << "nameScheme = ..." << endl;
for (i = 0; i < 50 && i < catCount; i++)
for (int i = 0; i < 50 && i < catCount; i++)
{
Indent(out, indent+1);
out << "set[" << i << "] has name \"" << nameScheme[i] << "\"";
if (i < colorScheme.size())
if (i < (int)colorScheme.size())
out << " and color \"" << colorScheme[i] << "\"";
out << endl;
}
......@@ -916,11 +914,11 @@ avtSubsetsMetaData::Print(ostream &out, int indent) const
Indent(out, indent+1);
out << "." << endl;
}
for (i = catCount-50; i < catCount; i++)
for (int i = catCount-50; i < catCount; i++)
{
Indent(out, indent+1);
out << "set[" << i << "] has name \"" << nameScheme[i] << "\"";
if (i < colorScheme.size())
if (i < (int)colorScheme.size())
out << " and color \"" << colorScheme[i] << "\"";
out << endl;
}
......@@ -930,7 +928,7 @@ avtSubsetsMetaData::Print(ostream &out, int indent) const
if (setsToChunksMaps.size())
{
i = 0;
size_t i = 0;
while (i < setsToChunksMaps.size())
{
Indent(out, indent);
......@@ -953,7 +951,7 @@ avtSubsetsMetaData::Print(ostream &out, int indent) const
{
Indent(out, indent);
out << "graphEdges..." << endl;
for (i = 0; i < 100 && i < graphEdges.size(); i += 2)
for (size_t i = 0; i < 100 && i < graphEdges.size(); i += 2)
{
Indent(out, indent+1);
out << "set[" << graphEdges[2*i ] << "] is parent of "
......@@ -976,7 +974,7 @@ avtSubsetsMetaData::Print(ostream &out, int indent) const
Indent(out, indent+1);
out << "." << endl;
}
for (i = graphEdges.size() - 100; i < graphEdges.size(); i += 2)
for (size_t i = graphEdges.size() - 100; i < graphEdges.size(); i += 2)
{
Indent(out, indent+1);
out << "set[" << graphEdges[2*i ] << "] is parent of "
......
......@@ -21,8 +21,6 @@ Indent(ostream &out, int indent)
void
avtSubsetsMetaData::Print(ostream &out, int indent) const
{
size_t i;
avtVarMetaData::Print(out, indent);
Indent(out, indent);
......@@ -59,11 +57,11 @@ avtSubsetsMetaData::Print(ostream &out, int indent) const
{
Indent(out, indent);
out << "nameScheme = ..." << endl;
for (i = 0; i < 50 && i < catCount; i++)
for (int i = 0; i < 50 && i < catCount; i++)
{
Indent(out, indent+1);
out << "set[" << i << "] has name \"" << nameScheme[i] << "\"";
if (i < colorScheme.size())
if (i < (int)colorScheme.size())
out << " and color \"" << colorScheme[i] << "\"";
out << endl;
}
......@@ -84,11 +82,11 @@ avtSubsetsMetaData::Print(ostream &out, int indent) const
Indent(out, indent+1);
out << "." << endl;
}
for (i = catCount-50; i < catCount; i++)
for (int i = catCount-50; i < catCount; i++)
{
Indent(out, indent+1);
out << "set[" << i << "] has name \"" << nameScheme[i] << "\"";
if (i < colorScheme.size())
if (i < (int)colorScheme.size())
out << " and color \"" << colorScheme[i] << "\"";
out << endl;
}
......@@ -98,7 +96,7 @@ avtSubsetsMetaData::Print(ostream &out, int indent) const
if (setsToChunksMaps.size())
{
i = 0;
size_t i = 0;
while (i < setsToChunksMaps.size())
{
Indent(out, indent);
......@@ -121,7 +119,7 @@ avtSubsetsMetaData::Print(ostream &out, int indent) const
{
Indent(out, indent);
out << "graphEdges..." << endl;
for (i = 0; i < 100 && i < graphEdges.size(); i += 2)
for (size_t i = 0; i < 100 && i < graphEdges.size(); i += 2)
{
Indent(out, indent+1);
out << "set[" << graphEdges[2*i ] << "] is parent of "
......@@ -144,7 +142,7 @@ avtSubsetsMetaData::Print(ostream &out, int indent) const
Indent(out, indent+1);
out << "." << endl;
}
for (i = graphEdges.size() - 100; i < graphEdges.size(); i += 2)
for (size_t i = graphEdges.size() - 100; i < graphEdges.size(); i += 2)
{
Indent(out, indent+1);
out << "set[" << graphEdges[2*i ] << "] is parent of "
......
......@@ -635,7 +635,7 @@ avtVarMetaData::Print(ostream &out, int indent) const
{
Indent(out, indent);
out << "Restricted to material indices: " << matRestricted[0];
for (int i = 1; i < matRestricted.size(); i++)
for (size_t i = 1; i < matRestricted.size(); i++)
{
out << ", " << matRestricted[i];
if (i%20 == 0)
......
......@@ -225,7 +225,7 @@ avtVarMetaData::Print(ostream &out, int indent) const
{
Indent(out, indent);
out << "Restricted to material indices: " << matRestricted[0];
for (int i = 1; i < matRestricted.size(); i++)
for (size_t i = 1; i < matRestricted.size(); i++)
{
out << ", " << matRestricted[i];
if (i%20 == 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment