From 98c24e3a403a496e83d2df9b5d6e49a4b680ebdb Mon Sep 17 00:00:00 2001 From: kervala Date: Thu, 23 Sep 2010 13:36:21 +0200 Subject: [PATCH] Fixed: #1096 Build error with gcc --- code/nel/include/nel/ligo/primitive_utils.h | 7 ++++--- code/ryzom/tools/pd_parser/main.cpp | 10 ++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/code/nel/include/nel/ligo/primitive_utils.h b/code/nel/include/nel/ligo/primitive_utils.h index ff03a48cc..cc71e2d50 100644 --- a/code/nel/include/nel/ligo/primitive_utils.h +++ b/code/nel/include/nel/ligo/primitive_utils.h @@ -25,6 +25,7 @@ #include "nel/misc/o_xml.h" #include "nel/misc/file.h" #include "nel/misc/path.h" +#include #include #include @@ -151,7 +152,7 @@ public: _CurrentPrim(startPrim) { // mark the root node as non checked - _IndexStack.push_back(~0); + _IndexStack.push_back(std::numeric_limits::max()); } /** Each call to this method will return a primitive pointer that match @@ -162,7 +163,7 @@ public: { while (!_IndexStack.empty()) { - if (_IndexStack.back() == ~0) + if (_IndexStack.back() == std::numeric_limits::max()) { _IndexStack.back() = 0; // we need to check the current node. @@ -178,7 +179,7 @@ public: if (_CurrentPrim->getChild(child, _IndexStack.back()++)) { // go down into this node - _IndexStack.push_back(~0); + _IndexStack.push_back(std::numeric_limits::max()); _CurrentPrim = child; } } diff --git a/code/ryzom/tools/pd_parser/main.cpp b/code/ryzom/tools/pd_parser/main.cpp index 8f375a691..92b8dd4ce 100644 --- a/code/ryzom/tools/pd_parser/main.cpp +++ b/code/ryzom/tools/pd_parser/main.cpp @@ -32,14 +32,16 @@ int main(int argc, char **argv) uint arg; for (arg=1; (sint)arg