Fixed warnings
This commit is contained in:
parent
21b633e73b
commit
c0b696ba52
@ -40,7 +40,7 @@ int BodyPart::getNumModels()
|
||||
|
||||
Model * BodyPart::getModel(int partIndex)
|
||||
{
|
||||
if ((partIndex < 0) || (partIndex >= part_models.size()))
|
||||
if ((partIndex < 0) || (partIndex >= static_cast<int>(part_models.size())))
|
||||
return NULL;
|
||||
else
|
||||
return part_models[partIndex];
|
||||
|
@ -83,7 +83,6 @@ std::string MDLReader::getToken(std::string str, const char * delim,
|
||||
|
||||
ref_ptr<Texture> MDLReader::readTextureFile(std::string textureName)
|
||||
{
|
||||
int i;
|
||||
std::string texFile;
|
||||
std::string texPath;
|
||||
Image * texImage;
|
||||
@ -190,7 +189,6 @@ ref_ptr<StateSet> MDLReader::readMaterialFile(std::string materialName)
|
||||
bool found;
|
||||
ref_ptr<StateSet> stateSet;
|
||||
std::string shaderName;
|
||||
osg::Image * texImage;
|
||||
std::string texName;
|
||||
std::string tex2Name;
|
||||
ref_ptr<Texture> texture;
|
||||
@ -499,7 +497,6 @@ Model * MDLReader::processModel(std::istream * str, int offset)
|
||||
|
||||
Mesh * MDLReader::processMesh(std::istream * str, int offset)
|
||||
{
|
||||
int i;
|
||||
MDLMesh * mesh;
|
||||
Mesh * meshNode;
|
||||
|
||||
@ -527,7 +524,8 @@ bool MDLReader::readFile(const std::string & file)
|
||||
std::string fileName;
|
||||
std::ifstream * mdlFile;
|
||||
MDLHeader header;
|
||||
int i, j;
|
||||
int i;
|
||||
unsigned int j;
|
||||
int offset;
|
||||
MDLRoot * mdlRoot;
|
||||
BodyPart * partNode;
|
||||
|
@ -30,7 +30,7 @@ int MDLRoot::getNumBodyParts()
|
||||
|
||||
BodyPart * MDLRoot::getBodyPart(int partIndex)
|
||||
{
|
||||
if ((partIndex < 0) || (partIndex >= body_parts.size()))
|
||||
if ((partIndex < 0) || (partIndex >= static_cast<int>(body_parts.size())))
|
||||
return NULL;
|
||||
else
|
||||
return body_parts[partIndex];
|
||||
|
@ -48,7 +48,7 @@ int Model::getNumMeshes()
|
||||
|
||||
Mesh * Model::getMesh(int meshIndex)
|
||||
{
|
||||
if ((meshIndex < 0) || (meshIndex >= model_meshes.size()))
|
||||
if ((meshIndex < 0) || (meshIndex >= static_cast<int>(model_meshes.size())))
|
||||
return NULL;
|
||||
else
|
||||
return model_meshes[meshIndex];
|
||||
|
@ -98,7 +98,7 @@ ref_ptr<Group> VTXReader::processModel(std::istream * str, int offset,
|
||||
VTXModel model;
|
||||
float lastDistance;
|
||||
float distance;
|
||||
LOD * lodNode;
|
||||
LOD * lodNode = 0;
|
||||
ref_ptr<Group> group;
|
||||
ref_ptr<Group> result;
|
||||
|
||||
@ -327,7 +327,6 @@ ref_ptr<PrimitiveSet> VTXReader::processStrip(unsigned short * indexArray,
|
||||
std::istream * str,
|
||||
int offset)
|
||||
{
|
||||
int i;
|
||||
VTXStrip strip;
|
||||
ref_ptr<PrimitiveSet> primSet;
|
||||
unsigned short * start;
|
||||
@ -364,8 +363,7 @@ bool VTXReader::readFile(const std::string & file)
|
||||
{
|
||||
osgDB::ifstream * vtxFile;
|
||||
VTXHeader header;
|
||||
int i, j;
|
||||
int offset;
|
||||
int i;
|
||||
BodyPart * currentPart;
|
||||
ref_ptr<Group> partGroup;
|
||||
Group * rootGroup;
|
||||
|
@ -48,7 +48,7 @@ bool VVDReader::readFile(const std::string & file)
|
||||
osgDB::ifstream * vvdFile;
|
||||
VVDHeader header;
|
||||
int vertIndex;
|
||||
int i, j, k;
|
||||
int i, j;
|
||||
|
||||
// Remember the map name
|
||||
vvd_name = getStrippedName(file);
|
||||
|
Loading…
Reference in New Issue
Block a user