diff --git a/nel/include/nel/misc/common.h b/nel/include/nel/misc/common.h index 01817fa98..7bbca427c 100644 --- a/nel/include/nel/misc/common.h +++ b/nel/include/nel/misc/common.h @@ -412,8 +412,13 @@ public: Exception(); Exception(const std::string &reason); Exception(const char *format, ...); +#if defined(NL_COMP_GCC) && (GCC_VERSION < 40800) + virtual ~Exception() throw() {} + virtual const char *what() const throw(); +#else virtual ~Exception() NL_OVERRIDE {} virtual const char *what() const throw() NL_OVERRIDE; +#endif }; diff --git a/nel/include/nel/misc/file.h b/nel/include/nel/misc/file.h index 2d3912842..5db798a5e 100644 --- a/nel/include/nel/misc/file.h +++ b/nel/include/nel/misc/file.h @@ -41,8 +41,11 @@ struct EFile : public EStream EFile (const std::string& filename) : EStream( "Unknown file error in '"+filename+"'" ), Filename(filename) {} EFile (const std::string& filename, const std::string& text, bool ) : EStream( text ), Filename(filename) {} +#if defined(NL_COMP_GCC) && (GCC_VERSION < 40800) + virtual ~EFile() throw() {} +#else virtual ~EFile() NL_OVERRIDE {} - +#endif std::string Filename; }; diff --git a/nel/include/nel/misc/stream.h b/nel/include/nel/misc/stream.h index 9b18d575c..01f08b22b 100644 --- a/nel/include/nel/misc/stream.h +++ b/nel/include/nel/misc/stream.h @@ -81,7 +81,12 @@ struct EStream : public Exception EStream( const IStream &f, const std::string& str ); +#if defined(NL_COMP_GCC) && (GCC_VERSION < 40800) + virtual ~EStream() throw() {} +#else virtual ~EStream() NL_OVERRIDE {} +#endif + // May Not be Filled... std::string StreamName; diff --git a/ryzom/common/src/game_share/object.h b/ryzom/common/src/game_share/object.h index 5b8c1c45d..d5f54b40e 100644 --- a/ryzom/common/src/game_share/object.h +++ b/ryzom/common/src/game_share/object.h @@ -290,8 +290,11 @@ class CObjectNumber : public CObject public: explicit CObjectNumber(double value); explicit CObjectNumber(sint64 value); + double getNumberValue() const { return m_IsInteger ? m_Value.Integer : m_Value.Number; } + sint64 getIntegerValue() const { return m_IsInteger ? m_Value.Integer : m_Value.Number; } - virtual const char *getTypeAsString() const NL_OVERRIDE; +#if defined(NL_COMP_GCC) && (GCC_VERSION < 40800) + virtual const char *getTypeAsString() const; virtual bool set(const std::string& key, sint64 value) NL_OVERRIDE; virtual bool set(const std::string& key, double value) NL_OVERRIDE; @@ -301,14 +304,44 @@ public: virtual CObject* clone() const NL_OVERRIDE; - double getNumberValue() const { return m_IsInteger ? m_Value.Integer : m_Value.Number; } - sint64 getIntegerValue() const { return m_IsInteger ? m_Value.Integer : m_Value.Number; } + virtual void dump(const std::string prefix = "", uint depth = 0) const; + + virtual bool equal(const CObject* other) const; +#else + virtual const char *getTypeAsString() const NL_OVERRIDE; + + virtual bool set(const std::string& key, sint64 value) NL_OVERRIDE; + virtual bool set(const std::string& key, double value) NL_OVERRIDE; + virtual bool set(const std::string& key, const std::string&value) NL_OVERRIDE; + + virtual bool setObject(const std::string& key, CObject* value) NL_OVERRIDE; + + virtual CObject* clone() const NL_OVERRIDE; virtual void dump(const std::string prefix = "", uint depth = 0) const NL_OVERRIDE; virtual bool equal(const CObject* other) const NL_OVERRIDE; +#endif protected: +#if defined(NL_COMP_GCC) && (GCC_VERSION < 40800) + virtual void doSerialize(std::string& out, CSerializeContext& context) const; + + virtual bool doIsNumber() const NL_OVERRIDE; + + virtual double doToNumber() const NL_OVERRIDE; + + virtual bool doIsInteger() const NL_OVERRIDE; + + virtual sint64 doToInteger() const NL_OVERRIDE; + + virtual std::string doToString() const NL_OVERRIDE; + + virtual void inPlaceCopyTo(CObject &dest) const NL_OVERRIDE; + virtual void inPlaceCopy(const CObjectNumber &src) NL_OVERRIDE; + + virtual void visitInternal(IObjectVisitor &visitor); +#else virtual void doSerialize(std::string& out, CSerializeContext& context) const NL_OVERRIDE; virtual bool doIsNumber() const NL_OVERRIDE; @@ -325,6 +358,7 @@ protected: virtual void inPlaceCopy(const CObjectNumber &src) NL_OVERRIDE; virtual void visitInternal(IObjectVisitor &visitor) NL_OVERRIDE; +#endif private: bool m_IsInteger;