From 87b6632ba6e1cfe0fbaf2c5a6e12dac4001a17aa Mon Sep 17 00:00:00 2001 From: fredb Date: Wed, 14 May 2008 09:51:11 +0000 Subject: [PATCH] Rename FontStatus enum labels because ERROR is already a macro under Windows --- src/GUI/SafeTexFont.cxx | 10 +++++----- src/GUI/SafeTexFont.hxx | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/GUI/SafeTexFont.cxx b/src/GUI/SafeTexFont.cxx index e40f4898b..0fcfc6e47 100644 --- a/src/GUI/SafeTexFont.cxx +++ b/src/GUI/SafeTexFont.cxx @@ -26,7 +26,7 @@ int SafeTexFont::load(const char *fname, GLenum mag, GLenum min) { struct stat buf; if (stat(fname, &buf) == -1) { - _status = ERROR; + _status = e_ERROR; return FNT_FALSE; } _name = fname; @@ -37,16 +37,16 @@ int SafeTexFont::load(const char *fname, GLenum mag, GLenum min) bool SafeTexFont::ensureTextureLoaded() { - if (_status != ERROR) { - if (_status == LOADED) { + if (_status != e_ERROR) { + if (_status == e_LOADED) { return true; } else { int loadStatus = fntTexFont::load(_name.c_str(), _mag, _min); if (loadStatus == FNT_TRUE) { - _status = LOADED; + _status = e_LOADED; return true; } else { - _status = ERROR; + _status = e_ERROR; _error = ulGetError(); return false; } diff --git a/src/GUI/SafeTexFont.hxx b/src/GUI/SafeTexFont.hxx index c1ca71801..0e6397c8b 100644 --- a/src/GUI/SafeTexFont.hxx +++ b/src/GUI/SafeTexFont.hxx @@ -31,7 +31,7 @@ namespace flightgear class SafeTexFont : public fntTexFont { public: - SafeTexFont() : _status(NOT_LOADED) {} + SafeTexFont() : _status(e_NOT_LOADED) {} /** Load the texture for this font. * @param mag OpenGL texture magnification; default is GL_NEAREST * @param min OpenGL texture minification; default is @@ -46,9 +46,9 @@ public: void puts(sgVec3 curpos, float pointsize, float italic, const char *s); enum FontStatus { - ERROR = -1, - NOT_LOADED = 0, - LOADED = 1 + e_ERROR = -1, + e_NOT_LOADED = 0, + e_LOADED = 1 }; FontStatus getStatus() { return _status; } std::string& fntError() { return _error; } -- 2.39.5