From 182305127ad81118931716e9ef077d19819f4874 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Sat, 16 Apr 2005 15:21:47 +0000 Subject: Build fixes for newer g++ from Thomas Lussnig. --- lib/Enum.h | 15 ++++++++------- lib/bufferstore.h | 2 +- lib/psiprocess.h | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) (limited to 'lib') diff --git a/lib/Enum.h b/lib/Enum.h index 6ecd3ab..a34b5d3 100644 --- a/lib/Enum.h +++ b/lib/Enum.h @@ -140,7 +140,7 @@ protected: */ template 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::sdata Enum::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. \ diff --git a/lib/bufferstore.h b/lib/bufferstore.h index 9472301..89b3728 100644 --- a/lib/bufferstore.h +++ b/lib/bufferstore.h @@ -130,7 +130,7 @@ public: * * @returns The stream. */ - friend class std::ostream &operator<<(std::ostream &, const bufferStore &); + friend std::ostream &operator<<(std::ostream &, const bufferStore &); /** * Tests if the bufferStore is empty. diff --git a/lib/psiprocess.h b/lib/psiprocess.h index f116119..f8978d5 100644 --- a/lib/psiprocess.h +++ b/lib/psiprocess.h @@ -105,7 +105,7 @@ public: * The output is in human readable similar to the * output of a "ls" command. */ - friend class std::ostream &operator<<(std::ostream &o, const PsiProcess &p); + friend std::ostream &operator<<(std::ostream &o, const PsiProcess &p); private: friend class rpcs; -- cgit v1.2.3