Moved "unsigned int i" from for(.. to just before it, and removed subsequent
ones to get the VisualStudio compiler working once more.
This commit is contained in:
parent
22d54f05e4
commit
c72953d94b
@ -125,8 +125,8 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
// create commandline args
|
// create commandline args
|
||||||
std::vector<std::string> commandLine;
|
std::vector<std::string> commandLine;
|
||||||
for (int i = 1; i < argc; i++)
|
for (int ia = 1; ia < argc; ia++)
|
||||||
commandLine.push_back(argv[i]);
|
commandLine.push_back(argv[ia]);
|
||||||
|
|
||||||
// initialize the viewer
|
// initialize the viewer
|
||||||
osgGLUT::Viewer viewer;
|
osgGLUT::Viewer viewer;
|
||||||
@ -138,7 +138,8 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
// assumes any remaining parameters are models
|
// assumes any remaining parameters are models
|
||||||
std::vector<osg::Node*> model;
|
std::vector<osg::Node*> model;
|
||||||
for (unsigned int i = 0; i < commandLine.size(); i++) {
|
unsigned int i;
|
||||||
|
for (i = 0; i < commandLine.size(); i++) {
|
||||||
std::cerr << "Loading " << commandLine[i] << std::endl;
|
std::cerr << "Loading " << commandLine[i] << std::endl;
|
||||||
osg::Node* node = osgDB::readNodeFile(commandLine[i]);
|
osg::Node* node = osgDB::readNodeFile(commandLine[i]);
|
||||||
if (node)
|
if (node)
|
||||||
@ -162,7 +163,7 @@ int main( int argc, char **argv )
|
|||||||
const int nreps[] = { -1, 5, 1 };
|
const int nreps[] = { -1, 5, 1 };
|
||||||
|
|
||||||
float x = 0.0f;
|
float x = 0.0f;
|
||||||
for (unsigned int i = 0; i < (sizeof(speed) / sizeof(speed[0])); i++) {
|
for (i = 0; i < (sizeof(speed) / sizeof(speed[0])); i++) {
|
||||||
osg::Sequence* seqNode = generateSeq(mode[i], speed[i], nreps[i],
|
osg::Sequence* seqNode = generateSeq(mode[i], speed[i], nreps[i],
|
||||||
model);
|
model);
|
||||||
if (!seqNode)
|
if (!seqNode)
|
||||||
|
Loading…
Reference in New Issue
Block a user