change MAX_PATH to max_path to avoid Windows compilation problems

This commit is contained in:
Tim Moore
2009-06-17 11:37:21 +02:00
parent 76948416a9
commit b633b8d0d3
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -54,8 +54,8 @@ void
sg_location::setPath (const char* path) sg_location::setPath (const char* path)
{ {
if (path) { if (path) {
strncpy(_path, path, MAX_PATH); strncpy(_path, path, max_path);
_path[MAX_PATH -1] = '\0'; _path[max_path -1] = '\0';
} else { } else {
_path[0] = '\0'; _path[0] = '\0';
} }
+2 -2
View File
@@ -26,7 +26,7 @@ using std::string;
class sg_location class sg_location
{ {
public: public:
enum {MAX_PATH = 1024}; enum {max_path = 1024};
sg_location (); sg_location ();
sg_location(const std::string& path, int line = -1, int column = -1); sg_location(const std::string& path, int line = -1, int column = -1);
explicit sg_location(const char* 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 void setByte (int byte);
virtual std::string asString () const; virtual std::string asString () const;
private: private:
char _path[MAX_PATH]; char _path[max_path];
int _line; int _line;
int _column; int _column;
int _byte; int _byte;