Commit e5601020 authored by bonnell's avatar bonnell

Add Hari's warning removal to code files so state objects can be cleanly regnerated

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23649 18c085ea-50e0-402c-830e-de6fd14e8384
parent cfbfdd48
......@@ -989,7 +989,6 @@ AnnotationObjectList::GetNewObjectName() const
int
AnnotationObjectList::IndexForName(const std::string &name) const
{
//int index = -1;
for(int i = 0; i < GetNumAnnotations(); ++i)
{
if(GetAnnotation(i).GetObjectName() == name)
......
......@@ -114,7 +114,6 @@ Definition:
int
AnnotationObjectList::IndexForName(const std::string &name) const
{
int index = -1;
for(int i = 0; i < GetNumAnnotations(); ++i)
{
if(GetAnnotation(i).GetObjectName() == name)
......
......@@ -31,7 +31,7 @@ Definition:
std::string
ClientInformation::GetMethod(int i) const
{
if(i >= 0 && i < methodNames.size())
if(i >= 0 && (size_t)i < methodNames.size())
return methodNames[i];
return "";
}
......@@ -42,7 +42,7 @@ Definition:
std::string
ClientInformation::GetMethodPrototype(int i) const
{
if(i >= 0 && i < methodPrototypes.size())
if(i >= 0 && (size_t)i < methodPrototypes.size())
return methodPrototypes[i];
return "";
}
......
......@@ -66,7 +66,7 @@ Definition:
const ColorControlPointList *
ColorTableAttributes::GetColorControlPoints(int index) const
{
if(index >= 0 && index < colorTables.size())
if(index >= 0 && (size_t)index < colorTables.size())
return ((ColorControlPointList *)colorTables[index]);
else
return 0;
......@@ -104,7 +104,7 @@ ColorTableAttributes::GetColorControlPoints(const std::string &name) const
{
int index = GetColorTableIndex(name);
if(index >= 0 && index < colorTables.size())
if(index >= 0 && (size_t)index < colorTables.size())
return ((ColorControlPointList *)colorTables[index]);
else
return 0;
......@@ -239,7 +239,7 @@ Definition:
void
ColorTableAttributes::RemoveColorTable(int index)
{
if(index >= 0 && index < names.size())
if(index >= 0 && (size_t)index < names.size())
{
// Determine if the color table is active.
bool isActiveContinuous, isActiveDiscrete;
......
......@@ -426,7 +426,7 @@ Definition:
DBOptionsAttributes::OptionType
DBOptionsAttributes::GetType(int index) const
{
if (index < 0 || index >= types.size())
if (index < 0 || (size_t)index >= types.size())
EXCEPTION0(BadDeclareFormatString);
return (DBOptionsAttributes::OptionType) types[index];
......
......@@ -171,7 +171,7 @@ DatabaseCorrelation::AddDatabase(const std::string &database, int nStates,
// Add the times and cycles for the new database to the correlation so
// we can access them later and perhaps use them to correlate.
//
for(int i = 0; i < nStates; ++i)
for(size_t i = 0; i < (size_t)nStates; ++i)
{
double t = ((i < times.size()) ? times[i] : 0.);
databaseTimes.push_back(t);
......@@ -601,7 +601,7 @@ int
DatabaseCorrelation::GetCondensedCycleForState(int state) const
{
int retval = 0;
if(state >= 0 && state < condensedCycles.size())
if(state >= 0 && (size_t)state < condensedCycles.size())
retval = condensedCycles[state];
return retval;
......@@ -634,7 +634,7 @@ double
DatabaseCorrelation::GetCondensedTimeForState(int state) const
{
double retval = 0.;
if(state >= 0 && state < condensedTimes.size())
if(state >= 0 && (size_t)state < condensedTimes.size())
retval = condensedTimes[state];
return retval;
......
......@@ -295,7 +295,7 @@ Definition:
LaunchProfile *
MachineProfile::GetActiveLaunchProfile() const
{
if (activeProfile<0 || activeProfile>=launchProfiles.size())
if (activeProfile<0 || (size_t)activeProfile>=launchProfiles.size())
return NULL;
return (LaunchProfile*)launchProfiles[activeProfile];
......
......@@ -153,7 +153,7 @@ const char *NameschemeAttributes::GetName(int n) const
// First, see if we have ALL explicit names defined and, if so,
// ensure 'n' is in correct range for it.
if (n < allExplicitNames.size())
if ((size_t)n < allExplicitNames.size())
return allExplicitNames[n].c_str();
// Next, see if we have an explicit names map for this object.
......
......@@ -4599,8 +4599,6 @@ PickAttributes::CreateOutputMapNode(MapNode &m, bool withLetter)
#endif
}
//char buff[512];
std::string fileName;
size_t pos = databaseName.find_last_of('/');
if (pos >= databaseName.size())
......
......@@ -1276,8 +1276,6 @@ PickAttributes::CreateOutputMapNode(MapNode &m, bool withLetter)
#endif
}
char buff[512];
std::string fileName;
size_t pos = databaseName.find_last_of('/');
if (pos >= databaseName.size())
......
......@@ -1795,7 +1795,6 @@ PickVarInfo::CreateOutputMapNode(const std::string &type, MapNode &m)
else
{
MapNode n;
//int mixOffset = 0;
for (size_t i = 0; i < names.size(); ++i)
{
std::string stripName = names[i].substr(1, names[i].size() -2);
......@@ -1878,6 +1877,7 @@ PickVarInfo::CreateOutputMapNode(const std::string &type, MapNode &m)
m[variableName] = n;
#if 0
int mixOffset = 0;
if (mixVar)
{
int nMats = numMatsPerZone[i];
......
......@@ -387,7 +387,7 @@ PickVarInfo::CreateOutputString(std::string &os, const std::string &type)
else if (variableType == "label")
{
int labelSize = values.size() / names.size();
for (j = labelSize*i; j < labelSize * (i+1); j++)
for (size_t j = labelSize*i; j < labelSize * (i+1); j++)
{
char c[2] = {(char)values[j], 0};
os += c;
......@@ -803,7 +803,6 @@ PickVarInfo::CreateOutputMapNode(const std::string &type, MapNode &m)
else
{
MapNode n;
int mixOffset = 0;
for (size_t i = 0; i < names.size(); ++i)
{
std::string stripName = names[i].substr(1, names[i].size() -2);
......@@ -886,6 +885,7 @@ PickVarInfo::CreateOutputMapNode(const std::string &type, MapNode &m)
m[variableName] = n;
#if 0
int mixOffset = 0;
if (mixVar)
{
int nMats = numMatsPerZone[i];
......
......@@ -157,7 +157,7 @@ PluginManagerAttributes::GetPluginCategoryName(const std::string &s) const
{
std::string c("?");
int index = GetIndexByID(s);
if(index >= 0 && index < category.size())
if(index >= 0 && (size_t)index < category.size())
{
c = category[index];
}
......@@ -184,7 +184,7 @@ void
PluginManagerAttributes::SetPluginCategoryName(const std::string &s, const std::string &c)
{
int index = GetIndexByID(s);
if(index >= 0 && index < category.size())
if(index >= 0 && (size_t)index < category.size())
{
category[index] = c;
SelectCategory();
......
......@@ -42,8 +42,8 @@ View2DAttributes::GetUseFullFrame(const double *limits) const
// if the limits are not initialized then doing math
// with them will cause an error so check them first.
if ( limits[1] == -DBL_MAX && limits[0] == DBL_MAX ||
limits[3] == -DBL_MAX && limits[2] == DBL_MAX )
if ( (limits[1] == -DBL_MAX && limits[0] == DBL_MAX) ||
(limits[3] == -DBL_MAX && limits[2] == DBL_MAX) )
{
return false;
}
......
......@@ -1353,6 +1353,7 @@ void View3DAttributes::RotateAxis(int axis, double angle)
for(int i = 0; i < 15; ++i)
r[i] = 0.0;
//
// Calculate the rotation matrix in screen coordinates.
//
......@@ -1663,7 +1664,6 @@ View3DAttributes::ResetView(const double *bbox)
// scale with perspective projections.
//
double width;
//double distance;
width = 0.5 * sqrt(((bbox[1] - bbox[0]) *
(bbox[1] - bbox[0])) +
......@@ -1673,7 +1673,6 @@ View3DAttributes::ResetView(const double *bbox)
(bbox[5] - bbox[4])));
view3D.viewAngle = 30.;
//distance = width / tan (view3D.viewAngle * 3.1415926535 / 360.);
view3D.parallelScale = width;
......
......@@ -23,6 +23,9 @@ void View3DAttributes::RotateAxis(int axis, double angle)
double viewFocus_tmp[3];
double dist;
for(int i = 0; i < 15; ++i)
r[i] = 0.0;
//
// Calculate the rotation matrix in screen coordinates.
//
......@@ -336,7 +339,6 @@ View3DAttributes::ResetView(const double *bbox)
// scale with perspective projections.
//
double width;
double distance;
width = 0.5 * sqrt(((bbox[1] - bbox[0]) *
(bbox[1] - bbox[0])) +
......@@ -346,7 +348,6 @@ View3DAttributes::ResetView(const double *bbox)
(bbox[5] - bbox[4])));
view3D.viewAngle = 30.;
distance = width / tan (view3D.viewAngle * 3.1415926535 / 360.);
view3D.parallelScale = width;
......
......@@ -18,7 +18,7 @@ void
VisualCueInfo::SetPointF(int i, const float *pt)
{
// extend vector of points as necessary
while (points.size() < 3*(i+1))
while ((int)points.size() < 3*(i+1))
points.push_back(0.0);
points[3*i+0] = pt[0];
......@@ -46,7 +46,7 @@ Definition:
bool
VisualCueInfo::GetPointF(int i, float *pt) const
{
if (points.size() < 3*i)
if ((int)points.size() < 3*i)
return false;
pt[0] = (float) points[3*i+0];
......@@ -112,7 +112,7 @@ void
VisualCueInfo::SetPointD(int i, const double *pt)
{
// extend vector of points as necessary
while (points.size() < 3*(i+1))
while ((int)points.size() < 3*(i+1))
points.push_back(0.0);
points[3*i+0] = pt[0];
......@@ -140,7 +140,7 @@ Definition:
bool
VisualCueInfo::GetPointD(int i, double *pt) const
{
if (points.size() < 3*i)
if ((int)points.size() < 3*i)
return false;
pt[0] = points[3*i+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