Fix issues with old gcc compiler (required by forge server)

feature/compatibility-old-gcc
Nuno 3 years ago
parent 743bf7f601
commit b1bc1a3b6c

@ -412,8 +412,8 @@ public:
Exception(); Exception();
Exception(const std::string &reason); Exception(const std::string &reason);
Exception(const char *format, ...); Exception(const char *format, ...);
virtual ~Exception() NL_OVERRIDE {} virtual ~Exception() throw() {}
virtual const char *what() const throw() NL_OVERRIDE; virtual const char *what() const throw();
}; };

@ -41,7 +41,7 @@ struct EFile : public EStream
EFile (const std::string& filename) : EStream( "Unknown file error in '"+filename+"'" ), Filename(filename) {} 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) {} EFile (const std::string& filename, const std::string& text, bool ) : EStream( text ), Filename(filename) {}
virtual ~EFile() NL_OVERRIDE {} virtual ~EFile() throw() {}
std::string Filename; std::string Filename;
}; };

@ -81,7 +81,7 @@ struct EStream : public Exception
EStream( const IStream &f, const std::string& str ); EStream( const IStream &f, const std::string& str );
virtual ~EStream() NL_OVERRIDE {} virtual ~EStream() throw() {}
// May Not be Filled... // May Not be Filled...
std::string StreamName; std::string StreamName;

@ -52,8 +52,8 @@ public:
/// filePath: [out] ex. /games/nel/stream/00/00/000000000.. /// filePath: [out] ex. /games/nel/stream/00/00/000000000..
/// hash: [in] /// hash: [in]
/// name: [in] name for debugging purposes /// name: [in] name for debugging purposes
virtual bool getFile(std::string &filePath, const NLMISC::CHashKey &hash, const std::string &name) NL_OVERRIDE; virtual bool getFile(std::string &filePath, const NLMISC::CHashKey &hash, const std::string &name);
public: public:
/// Set storage path (ex. stream/) /// Set storage path (ex. stream/)
std::string Path; std::string Path;
@ -61,7 +61,7 @@ public:
/// Loads a package into the package manager (ex. http://cdn.ryzom.dev/open/stream/) /// Loads a package into the package manager (ex. http://cdn.ryzom.dev/open/stream/)
typedef std::vector<std::string> THosts; typedef std::vector<std::string> THosts;
THosts Hosts; THosts Hosts;
}; /* class CHttpPackageProvider */ }; /* class CHttpPackageProvider */
} /* namespace NLMISC */ } /* namespace NLMISC */

@ -291,40 +291,40 @@ public:
explicit CObjectNumber(double value); explicit CObjectNumber(double value);
explicit CObjectNumber(sint64 value); explicit CObjectNumber(sint64 value);
virtual const char *getTypeAsString() const NL_OVERRIDE; virtual const char *getTypeAsString() const;
virtual bool set(const std::string& key, sint64 value) NL_OVERRIDE; virtual bool set(const std::string& key, sint64 value);
virtual bool set(const std::string& key, double value) NL_OVERRIDE; virtual bool set(const std::string& key, double value);
virtual bool set(const std::string& key, const std::string&value) NL_OVERRIDE; virtual bool set(const std::string& key, const std::string&value);
virtual bool setObject(const std::string& key, CObject* value) NL_OVERRIDE; virtual bool setObject(const std::string& key, CObject* value);
virtual CObject* clone() const NL_OVERRIDE; virtual CObject* clone() const;
double getNumberValue() const { return m_IsInteger ? m_Value.Integer : m_Value.Number; } double getNumberValue() const { return m_IsInteger ? m_Value.Integer : m_Value.Number; }
sint64 getIntegerValue() 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 NL_OVERRIDE; virtual void dump(const std::string prefix = "", uint depth = 0) const;
virtual bool equal(const CObject* other) const NL_OVERRIDE; virtual bool equal(const CObject* other) const;
protected: protected:
virtual void doSerialize(std::string& out, CSerializeContext& context) const NL_OVERRIDE; virtual void doSerialize(std::string& out, CSerializeContext& context) const;
virtual bool doIsNumber() const NL_OVERRIDE; virtual bool doIsNumber() const;
virtual double doToNumber() const NL_OVERRIDE; virtual double doToNumber() const;
virtual bool doIsInteger() const NL_OVERRIDE; virtual bool doIsInteger() const;
virtual sint64 doToInteger() const NL_OVERRIDE; virtual sint64 doToInteger() const;
virtual std::string doToString() const NL_OVERRIDE; virtual std::string doToString() const;
virtual void inPlaceCopyTo(CObject &dest) const NL_OVERRIDE; virtual void inPlaceCopyTo(CObject &dest) const;
virtual void inPlaceCopy(const CObjectNumber &src) NL_OVERRIDE; virtual void inPlaceCopy(const CObjectNumber &src);
virtual void visitInternal(IObjectVisitor &visitor) NL_OVERRIDE; virtual void visitInternal(IObjectVisitor &visitor);
private: private:
bool m_IsInteger; bool m_IsInteger;

Loading…
Cancel
Save