]> git.mxchange.org Git - simgear.git/commitdiff
change MAX_PATH to max_path to avoid Windows compilation problems
authorTim Moore <timoore@redhat.com>
Wed, 17 Jun 2009 09:37:21 +0000 (11:37 +0200)
committerTim Moore <timoore@redhat.com>
Wed, 17 Jun 2009 09:37:21 +0000 (11:37 +0200)
simgear/structure/exception.cxx
simgear/structure/exception.hxx

index c46a1c9636c25aac25b40dfca32469cf27385fd7..821ae3248c373186bc457a6bab306258f7738434 100644 (file)
@@ -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';
   }
index eaf126959f5901f4482f3be686d59400b58c89f3..3a8bcab70b7e52bb6601725602734f553d43eb35 100644 (file)
@@ -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;