Fixed: #1096 Build error with gcc

This commit is contained in:
kervala 2010-09-23 13:36:21 +02:00
parent 5b2628f4ba
commit 98c24e3a40
2 changed files with 10 additions and 7 deletions

View file

@ -25,6 +25,7 @@
#include "nel/misc/o_xml.h" #include "nel/misc/o_xml.h"
#include "nel/misc/file.h" #include "nel/misc/file.h"
#include "nel/misc/path.h" #include "nel/misc/path.h"
#include <limits>
#include <vector> #include <vector>
#include <string> #include <string>
@ -151,7 +152,7 @@ public:
_CurrentPrim(startPrim) _CurrentPrim(startPrim)
{ {
// mark the root node as non checked // mark the root node as non checked
_IndexStack.push_back(~0); _IndexStack.push_back(std::numeric_limits<uint>::max());
} }
/** Each call to this method will return a primitive pointer that match /** Each call to this method will return a primitive pointer that match
@ -162,7 +163,7 @@ public:
{ {
while (!_IndexStack.empty()) while (!_IndexStack.empty())
{ {
if (_IndexStack.back() == ~0) if (_IndexStack.back() == std::numeric_limits<uint>::max())
{ {
_IndexStack.back() = 0; _IndexStack.back() = 0;
// we need to check the current node. // we need to check the current node.
@ -178,7 +179,7 @@ public:
if (_CurrentPrim->getChild(child, _IndexStack.back()++)) if (_CurrentPrim->getChild(child, _IndexStack.back()++))
{ {
// go down into this node // go down into this node
_IndexStack.push_back(~0); _IndexStack.push_back(std::numeric_limits<uint>::max());
_CurrentPrim = child; _CurrentPrim = child;
} }
} }

View file

@ -32,14 +32,16 @@ int main(int argc, char **argv)
uint arg; uint arg;
for (arg=1; (sint)arg<argc; ++arg) for (arg=1; (sint)arg<argc; ++arg)
{ {
if (argv[arg] == "-hauto") if (strcmp(argv[arg], "-hauto") == 0)
{
GenerateHAuto = true; GenerateHAuto = true;
else if (argv[arg] == "-dbgmsg") }
else if (strcmp(argv[arg], "-dbgmsg") == 0)
{ {
VerboseMode = true; VerboseMode = true;
GenerateDebugMessages = true; GenerateDebugMessages = true;
} }
else if (argv[arg] == "-onlylogs") else if (strcmp(argv[arg], "-onlylogs") == 0)
{ {
GenerateOnlyLogs = true; GenerateOnlyLogs = true;
} }