From: Tim Moore Date: Wed, 17 Jun 2009 09:37:21 +0000 (+0200) Subject: change MAX_PATH to max_path to avoid Windows compilation problems X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b633b8d0d3f06a90cf357fdc5a14c8ee25d143d7;p=simgear.git change MAX_PATH to max_path to avoid Windows compilation problems --- diff --git a/simgear/structure/exception.cxx b/simgear/structure/exception.cxx index c46a1c96..821ae324 100644 --- a/simgear/structure/exception.cxx +++ b/simgear/structure/exception.cxx @@ -54,8 +54,8 @@ void sg_location::setPath (const char* path) { if (path) { - strncpy(_path, path, MAX_PATH); - _path[MAX_PATH -1] = '\0'; + strncpy(_path, path, max_path); + _path[max_path -1] = '\0'; } else { _path[0] = '\0'; } diff --git a/simgear/structure/exception.hxx b/simgear/structure/exception.hxx index eaf12695..3a8bcab7 100644 --- a/simgear/structure/exception.hxx +++ b/simgear/structure/exception.hxx @@ -26,7 +26,7 @@ using std::string; class sg_location { public: - enum {MAX_PATH = 1024}; + enum {max_path = 1024}; sg_location (); sg_location(const std::string& path, int line = -1, int column = -1); explicit sg_location(const char* path, int line = -1, int column = -1); @@ -41,7 +41,7 @@ public: virtual void setByte (int byte); virtual std::string asString () const; private: - char _path[MAX_PATH]; + char _path[max_path]; int _line; int _column; int _byte;