From 2b7c7bdc8c74f36a806503b10162e5d33eee1dc8 Mon Sep 17 00:00:00 2001 From: Nuno Date: Sat, 27 Nov 2021 14:42:55 +0100 Subject: [PATCH] Fix issues with old gcc compiler (required by forge server) --- code/nel/include/nel/misc/common.h | 4 +-- code/nel/include/nel/misc/file.h | 2 +- code/nel/include/nel/misc/stream.h | 2 +- .../include/nel/web/http_package_provider.h | 6 ++-- code/nel/src/web/http_package_provider.cpp | 2 +- code/ryzom/common/src/game_share/object.h | 34 +++++++++---------- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/code/nel/include/nel/misc/common.h b/code/nel/include/nel/misc/common.h index a5d1b2f27..8446b58b0 100644 --- a/code/nel/include/nel/misc/common.h +++ b/code/nel/include/nel/misc/common.h @@ -368,8 +368,8 @@ public: Exception(); Exception(const std::string &reason); Exception(const char *format, ...); - virtual ~Exception() NL_OVERRIDE {} - virtual const char *what() const throw() NL_OVERRIDE; + virtual ~Exception() throw() {} + virtual const char *what() const throw(); }; diff --git a/code/nel/include/nel/misc/file.h b/code/nel/include/nel/misc/file.h index f634f4378..3e40d122a 100644 --- a/code/nel/include/nel/misc/file.h +++ b/code/nel/include/nel/misc/file.h @@ -38,7 +38,7 @@ 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) {} - virtual ~EFile() NL_OVERRIDE {} + virtual ~EFile() throw() {} std::string Filename; }; diff --git a/code/nel/include/nel/misc/stream.h b/code/nel/include/nel/misc/stream.h index 89db78a1c..da9f2835e 100644 --- a/code/nel/include/nel/misc/stream.h +++ b/code/nel/include/nel/misc/stream.h @@ -78,7 +78,7 @@ struct EStream : public Exception EStream( const IStream &f, const std::string& str ); - virtual ~EStream() NL_OVERRIDE {} + virtual ~EStream() throw() {} // May Not be Filled... std::string StreamName; diff --git a/code/nel/include/nel/web/http_package_provider.h b/code/nel/include/nel/web/http_package_provider.h index 380b5cfa2..98b64a203 100644 --- a/code/nel/include/nel/web/http_package_provider.h +++ b/code/nel/include/nel/web/http_package_provider.h @@ -52,8 +52,8 @@ public: /// filePath: [out] ex. /games/nel/stream/00/00/000000000.. /// hash: [in] /// 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: /// Set storage path (ex. stream/) std::string Path; @@ -61,7 +61,7 @@ public: /// Loads a package into the package manager (ex. http://cdn.ryzom.dev/open/stream/) typedef std::vector THosts; THosts Hosts; - + }; /* class CHttpPackageProvider */ } /* namespace NLMISC */ diff --git a/code/nel/src/web/http_package_provider.cpp b/code/nel/src/web/http_package_provider.cpp index b71f97467..d2abe78d1 100644 --- a/code/nel/src/web/http_package_provider.cpp +++ b/code/nel/src/web/http_package_provider.cpp @@ -41,7 +41,7 @@ CHttpPackageProvider::~CHttpPackageProvider() // release } -bool CHttpPackageProvider::getFile(std::string &filePath, const CHashKey &hash, const std::string &name) + bool CHttpPackageProvider::getFile(std::string &filePath, const CHashKey &hash, const std::string &name) { CStreamedPackage::makePath(filePath, hash); std::string downloadUrlFile = filePath + ".lzma"; diff --git a/code/ryzom/common/src/game_share/object.h b/code/ryzom/common/src/game_share/object.h index 806d790aa..65f32526c 100644 --- a/code/ryzom/common/src/game_share/object.h +++ b/code/ryzom/common/src/game_share/object.h @@ -288,40 +288,40 @@ public: explicit CObjectNumber(double 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, double value) NL_OVERRIDE; - virtual bool set(const std::string& key, const std::string&value) NL_OVERRIDE; + virtual bool set(const std::string& key, sint64 value); + virtual bool set(const std::string& key, double value); + 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; } 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: - 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 inPlaceCopy(const CObjectNumber &src) NL_OVERRIDE; + virtual void inPlaceCopyTo(CObject &dest) const; + virtual void inPlaceCopy(const CObjectNumber &src); - virtual void visitInternal(IObjectVisitor &visitor) NL_OVERRIDE; + virtual void visitInternal(IObjectVisitor &visitor); private: bool m_IsInteger;