diff options
author | Reuben Thomas <rrt@sc3d.org> | 2005-04-16 15:21:47 +0000 |
---|---|---|
committer | Reuben Thomas <rrt@sc3d.org> | 2005-04-16 15:21:47 +0000 |
commit | 182305127ad81118931716e9ef077d19819f4874 (patch) | |
tree | 961d303987ae1859a42cb8de430dd6362330416e /lib/Enum.h | |
parent | 6c7a1bab05abfc09a66304ba67864095865e8a6a (diff) | |
download | plptools-182305127ad81118931716e9ef077d19819f4874.tar.gz plptools-182305127ad81118931716e9ef077d19819f4874.tar.bz2 plptools-182305127ad81118931716e9ef077d19819f4874.zip |
Build fixes for newer g++ from Thomas Lussnig.
Diffstat (limited to 'lib/Enum.h')
-rw-r--r-- | lib/Enum.h | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -140,7 +140,7 @@ protected: */ template<typename E> class Enum : private EnumBase { -private: +public: struct sdata { /** * The constructor of the static data part. @@ -259,7 +259,8 @@ public: * XXX: throw OutOfRangeException ? */ static E getValueFor(const std::string &s) { - return (E) staticData.stringRep.lookup(s.getCStr()); +// return (E) staticData.stringRep.lookup(s.getCStr()); + return (E) staticData.stringRep.lookup(s.c_str()); } }; @@ -297,12 +298,12 @@ public: * * @author Henner Zeller */ +/** + * The definition of the static variable holding the static + * data for this Enumeration wrapper. + */ #define ENUM_DEFINITION(EnumName, initWith) \ -/** \ - * The definition of the static variable holding the static \ - * data for this Enumeration wrapper. \ - */ \ -Enum<EnumName>::sdata Enum<EnumName>::staticData; \ +template < EnumName > Enum< EnumName >::sdata Enum< EnumName >::staticData; \ /** \ * actual definition of the constructor for the static data. \ * This is called implicitly by the definition above. \ |