From 53bae35fc41eda6ba5eea533c5405960738fd76d Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 8 Aug 2018 09:39:40 +0200 Subject: [PATCH 1/5] Fixed: Use GlobalMemoryStatusEx instead of GlobalMemoryStatus (returns 64 bits numbers) --HG-- branch : develop --- code/nel/src/misc/system_info.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/code/nel/src/misc/system_info.cpp b/code/nel/src/misc/system_info.cpp index 2afa8da09..75d9707b3 100644 --- a/code/nel/src/misc/system_info.cpp +++ b/code/nel/src/misc/system_info.cpp @@ -1470,9 +1470,9 @@ uint64 CSystemInfo::availableHDSpace (const string &filename) uint64 CSystemInfo::availablePhysicalMemory () { #ifdef NL_OS_WINDOWS - MEMORYSTATUS ms; - GlobalMemoryStatus (&ms); - return uint64(ms.dwAvailPhys); + MEMORYSTATUSEX ms; + GlobalMemoryStatusEx(&ms); + return ms.ullAvailPhys; #elif defined NL_OS_MAC return uint64(getsysctlnum64("hw.usermem")); #elif defined NL_OS_UNIX @@ -1485,9 +1485,9 @@ uint64 CSystemInfo::availablePhysicalMemory () uint64 CSystemInfo::totalPhysicalMemory () { #ifdef NL_OS_WINDOWS - MEMORYSTATUS ms; - GlobalMemoryStatus (&ms); - return uint64(ms.dwTotalPhys); + MEMORYSTATUSEX ms; + GlobalMemoryStatusEx(&ms); + return ms.ullTotalPhys; #elif defined NL_OS_MAC return uint64(getsysctlnum64("hw.physmem")); #elif defined NL_OS_UNIX @@ -1867,9 +1867,9 @@ bool CSystemInfo::getVideoInfo (std::string &deviceName, uint64 &driverVersion) uint64 CSystemInfo::virtualMemory () { #ifdef NL_OS_WINDOWS - MEMORYSTATUS ms; - GlobalMemoryStatus (&ms); - return uint64(ms.dwTotalVirtual - ms.dwAvailVirtual); + MEMORYSTATUSEX ms; + GlobalMemoryStatusEx(&ms); + return ms.ullTotalVirtual - ms.ullAvailVirtual; #else return 0; #endif From 675f85c2888825bceb76c6f271f830ff8beea9bf Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 8 Aug 2018 20:37:51 +0200 Subject: [PATCH 2/5] Fixed: Warnings, throw(type) deprecated in C++11 and removed in C++17 --HG-- branch : develop --- code/nel/include/nel/3d/driver.h | 2 +- code/nel/include/nel/3d/dru.h | 6 ++-- code/nel/include/nel/3d/landscape.h | 4 +-- code/nel/include/nel/3d/nelu.h | 4 +-- code/nel/include/nel/gui/lua_ihm.h | 2 +- code/nel/include/nel/gui/lua_object.h | 36 +++++++++---------- code/nel/include/nel/misc/class_registry.h | 4 +-- code/nel/include/nel/misc/file.h | 16 ++++----- code/nel/include/nel/misc/mem_stream.h | 2 +- code/nel/include/nel/misc/string_mapper.h | 4 +-- code/nel/include/nel/net/message.h | 2 +- code/nel/include/nel/net/module.h | 4 +-- code/nel/include/nel/net/module_gateway.h | 4 +-- .../src/3d/driver/direct3d/driver_direct3d.h | 2 +- code/nel/src/3d/driver/opengl/driver_opengl.h | 2 +- code/nel/src/gui/lua_object.cpp | 24 ++++++------- code/nel/src/misc/file.cpp | 2 +- code/nel/src/misc/mem_stream.cpp | 2 +- code/ryzom/client/src/camera_recorder.cpp | 2 +- .../client/src/gateway_fec_transport.cpp | 6 ++-- code/ryzom/client/src/login_patch.cpp | 2 +- code/ryzom/client/src/r2/editor.cpp | 2 +- code/ryzom/client/src/r2/editor.h | 2 +- .../server/src/ai_service/ai_script_comp.h | 2 +- .../server/src/ai_service/script_compiler.h | 2 +- .../entity_manager/entity_base.h | 12 +++---- .../shop_type/item_for_sale.h | 4 +-- .../shop_type/items_for_sale.h | 2 +- 28 files changed, 79 insertions(+), 79 deletions(-) diff --git a/code/nel/include/nel/3d/driver.h b/code/nel/include/nel/3d/driver.h index 52bda8576..85140b3da 100644 --- a/code/nel/include/nel/3d/driver.h +++ b/code/nel/include/nel/3d/driver.h @@ -224,7 +224,7 @@ public: // @{ // first param is the associated window. // Must be a HWND for Windows (WIN32). - virtual bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show = true, bool resizeable = true) throw(EBadDisplay) = 0; + virtual bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show = true, bool resizeable = true) = 0; // Must be called after a setDisplay that initialize the mode virtual bool setMode(const GfxMode &mode) = 0; virtual bool getModes(std::vector &modes) = 0; diff --git a/code/nel/include/nel/3d/dru.h b/code/nel/include/nel/3d/dru.h index fda543ecd..c23d41382 100644 --- a/code/nel/include/nel/3d/dru.h +++ b/code/nel/include/nel/3d/dru.h @@ -134,14 +134,14 @@ class CDRU public: /// Portable Function which create a GL Driver (using gl dll...). - static IDriver *createGlDriver() throw(EDru); + static IDriver *createGlDriver(); /// Portable Function which create a GL ES Driver (using gl dll...). - static IDriver *createGlEsDriver() throw(EDru); + static IDriver *createGlEsDriver(); #ifdef NL_OS_WINDOWS /// Windows Function which create a Direct3d Driver. - static IDriver *createD3DDriver() throw(EDru); + static IDriver *createD3DDriver(); #endif // NL_OS_WINDOWS /// \name 2D render. diff --git a/code/nel/include/nel/3d/landscape.h b/code/nel/include/nel/3d/landscape.h index aa432f88b..a7383963d 100644 --- a/code/nel/include/nel/3d/landscape.h +++ b/code/nel/include/nel/3d/landscape.h @@ -168,9 +168,9 @@ public: void clear(); /// Verify the binding of patchs of all zones. throw EBadBind if error. - void checkBinds() throw(EBadBind); + void checkBinds(); /// Verify the binding of patchs of one zone. throw EBadBind if error. nop if zone not loaded. - void checkBinds(uint16 zoneId) throw(EBadBind); + void checkBinds(uint16 zoneId); /** * Build tileBank. Call this after loading the near and far tile banks. diff --git a/code/nel/include/nel/3d/nelu.h b/code/nel/include/nel/3d/nelu.h index fb30a5012..b64e83672 100644 --- a/code/nel/include/nel/3d/nelu.h +++ b/code/nel/include/nel/3d/nelu.h @@ -64,7 +64,7 @@ public: * * You can access the driver with CNELU::Driver. */ - static bool initDriver(uint w, uint h, uint bpp=32, bool windowed=true, nlWindow systemWindow=EmptyWindow, bool offscreen=false, bool direct3d=false) throw(EDru); + static bool initDriver(uint w, uint h, uint bpp=32, bool windowed=true, nlWindow systemWindow=EmptyWindow, bool offscreen=false, bool direct3d=false); /** Init all that we need for a Scene. * - register scene basics models, @@ -108,7 +108,7 @@ public: * - initScene(); * - initEventServer(); */ - static bool init(uint w, uint h, CViewport viewport=CViewport(), uint bpp=32, bool windowed=true, nlWindow systemWindow=EmptyWindow, bool offscreen = false, bool direct3d = false) throw(EDru); + static bool init(uint w, uint h, CViewport viewport=CViewport(), uint bpp=32, bool windowed=true, nlWindow systemWindow=EmptyWindow, bool offscreen = false, bool direct3d = false); /** Delete all: * - releaseEventServer(); diff --git a/code/nel/include/nel/gui/lua_ihm.h b/code/nel/include/nel/gui/lua_ihm.h index 974ece6f7..e45e1125f 100644 --- a/code/nel/include/nel/gui/lua_ihm.h +++ b/code/nel/include/nel/gui/lua_ihm.h @@ -118,7 +118,7 @@ namespace NLGUI /** read/write between values on a lua stack & a property exported from a 'CReflectable' derived object * (throws on error) */ - static void luaValueToReflectedProperty(CLuaState &ls, int stackIndex, CReflectable &target, const CReflectedProperty &property) throw(ELuaIHMException); + static void luaValueToReflectedProperty(CLuaState &ls, int stackIndex, CReflectable &target, const CReflectedProperty &property); // push a reflected property on the stack // NB : no check is done that 'property' is part of the class info of 'reflectedObject' diff --git a/code/nel/include/nel/gui/lua_object.h b/code/nel/include/nel/gui/lua_object.h index 1d3b0d64c..88c011347 100644 --- a/code/nel/include/nel/gui/lua_object.h +++ b/code/nel/include/nel/gui/lua_object.h @@ -110,7 +110,7 @@ namespace NLGUI /** create a sub table for this object, with a string as a key * This object must be a table or an exception if thrown */ - CLuaObject newTable(const char *tableName) throw(ELuaNotATable); + CLuaObject newTable(const char *tableName); /** Set a value in a table. @@ -118,29 +118,29 @@ namespace NLGUI * NB : value should came from the same lua environment * \TODO other type of keys */ - void setValue(const char *key, const CLuaObject &value) throw(ELuaNotATable); - void setValue(const std::string &key, const CLuaObject &value) throw(ELuaNotATable) { setValue(key.c_str(), value); } - void setValue(const char *key, const std::string &value) throw(ELuaNotATable); - void setValue(const char *key, const char *value) throw(ELuaNotATable); - void setValue(const char *key, bool value) throw(ELuaNotATable); - void setValue(const char *key, TLuaWrappedFunction value) throw(ELuaNotATable); - void setValue(const char *key, double value) throw(ELuaNotATable); - void setValue(const char *key, uint32 value) throw(ELuaNotATable); - void setValue(const char *key, sint32 value) throw(ELuaNotATable); - void setValue(const char *key, sint64 value) throw(ELuaNotATable); - void setValue(const std::string &key, const std::string &value) throw(ELuaNotATable) { setValue(key.c_str(), value); } - void setNil(const char *key) throw(ELuaNotATable); - void setNil(const std::string &key) throw(ELuaNotATable) { setNil(key.c_str()); } + void setValue(const char *key, const CLuaObject &value); + void setValue(const std::string &key, const CLuaObject &value) { setValue(key.c_str(), value); } + void setValue(const char *key, const std::string &value); + void setValue(const char *key, const char *value); + void setValue(const char *key, bool value); + void setValue(const char *key, TLuaWrappedFunction value); + void setValue(const char *key, double value); + void setValue(const char *key, uint32 value); + void setValue(const char *key, sint32 value); + void setValue(const char *key, sint64 value); + void setValue(const std::string &key, const std::string &value) { setValue(key.c_str(), value); } + void setNil(const char *key); + void setNil(const std::string &key) { setNil(key.c_str()); } /** Erase a value in a table by its key. * If this object is not a table then an exception is thrown. * \TODO other type of keys */ - void eraseValue(const char *key) throw(ELuaNotATable); - void eraseValue(const std::string &key) throw(ELuaNotATable) { eraseValue(key.c_str()); } + void eraseValue(const char *key); + void eraseValue(const std::string &key) { eraseValue(key.c_str()); } // test is this object is enumerable bool isEnumerable() const; // Enumeration of a table. If the object is not a table, an exception is thrown. - CLuaEnumeration enumerate() throw(ELuaNotATable); + CLuaEnumeration enumerate(); // retrieve metatable of an object (or nil if object has no metatable) CLuaObject getMetaTable() const; // set metatable for this object @@ -155,7 +155,7 @@ namespace NLGUI CLuaObject operator[](const std::string &key) const { return operator[](key.c_str()); } /** Checked access to a sub element of a table. An exception is thrown is the element is not a table. */ - CLuaObject at(const char *key) const throw (ELuaNotATable); + CLuaObject at(const char *key) const; CLuaObject at(const std::string &key) const { return at(key.c_str()); } // Test is that table has the given key. The object must be a table or an exception is thrown diff --git a/code/nel/include/nel/misc/class_registry.h b/code/nel/include/nel/misc/class_registry.h index 5c1fe8cd6..98139f5dc 100644 --- a/code/nel/include/nel/misc/class_registry.h +++ b/code/nel/include/nel/misc/class_registry.h @@ -86,10 +86,10 @@ public: static void release(); /// Register your class for future Instanciation. - static void registerClass(const std::string &className, IClassable* (*creator)(), const std::string &typeidCheck) throw(ERegistry); + static void registerClass(const std::string &className, IClassable* (*creator)(), const std::string &typeidCheck); /// Create an object from his class name. - static IClassable *create(const std::string &className) throw(ERegistry); + static IClassable *create(const std::string &className); /// check if the object has been correctly registered. Must be used for debug only, and Must compile with RTTI. static bool checkObject(IClassable* obj); diff --git a/code/nel/include/nel/misc/file.h b/code/nel/include/nel/misc/file.h index 17154e6be..78dba95c6 100644 --- a/code/nel/include/nel/misc/file.h +++ b/code/nel/include/nel/misc/file.h @@ -108,9 +108,9 @@ public: // Advanced Usage. /// flush the file. void flush(); /// Seek the file - bool seek (sint32 offset, IStream::TSeekOrigin origin) const throw(EStream); + bool seek (sint32 offset, IStream::TSeekOrigin origin) const; /// Get the location of the file pointer - sint32 getPos () const throw(EStream); + sint32 getPos () const; // Imp the Name of the stream as the name of the file. virtual std::string getStreamName() const; @@ -125,7 +125,7 @@ public: // Advanced Usage. // return true if there's nothing more to read (same as ifstream) bool eof (); - virtual void serialBuffer(uint8 *buf, uint len)throw(EReadError); + virtual void serialBuffer(uint8 *buf, uint len); /// \name Statistics @@ -148,7 +148,7 @@ public: // Advanced Usage. static void clearDump (); protected: - virtual void serialBit(bool &bit) throw(EReadError); + virtual void serialBit(bool &bit); virtual uint getDbgStreamSize() const; @@ -223,20 +223,20 @@ public: // Advanced Usage. /// flush the file. void flush(); /// Seek the file - bool seek (sint32 offset, IStream::TSeekOrigin origin) const throw(EStream); + bool seek (sint32 offset, IStream::TSeekOrigin origin) const; /// Get the location of the file pointer - sint32 getPos () const throw(EStream); + sint32 getPos () const; // Imp the Name of the stream as the name of the file. virtual std::string getStreamName() const; // very useful to serialize string in text mode (without the size) - virtual void serialBuffer(uint8 *buf, uint len) throw(EWriteError); + virtual void serialBuffer(uint8 *buf, uint len); protected: /// Internal close. void internalClose(bool success); - virtual void serialBit(bool &bit) throw(EWriteError); + virtual void serialBit(bool &bit); private: FILE *_F; diff --git a/code/nel/include/nel/misc/mem_stream.h b/code/nel/include/nel/misc/mem_stream.h index f614cc040..a9e8aacfc 100644 --- a/code/nel/include/nel/misc/mem_stream.h +++ b/code/nel/include/nel/misc/mem_stream.h @@ -197,7 +197,7 @@ public: * \return true if seek sucessfull. * \see ESeekNotSupported SeekOrigin getPos */ - virtual bool seek (sint32 offset, TSeekOrigin origin) const throw(EStream); + virtual bool seek (sint32 offset, TSeekOrigin origin) const; /** * Get the location of the stream pointer. diff --git a/code/nel/include/nel/misc/string_mapper.h b/code/nel/include/nel/misc/string_mapper.h index a20489f1c..aeaccf959 100644 --- a/code/nel/include/nel/misc/string_mapper.h +++ b/code/nel/include/nel/misc/string_mapper.h @@ -177,10 +177,10 @@ public: uint32 getCount() { return _IdCounter; } // helper serialize a string id as a string - void serial(NLMISC::IStream &f, TSStringId &strId) throw(EStream); + void serial(NLMISC::IStream &f, TSStringId &strId); // helper serialize a string id vector - void serial(NLMISC::IStream &f, std::vector &strIdVect) throw(EStream); + void serial(NLMISC::IStream &f, std::vector &strIdVect); }; diff --git a/code/nel/include/nel/net/message.h b/code/nel/include/nel/net/message.h index e96cb50d3..f1c571d44 100644 --- a/code/nel/include/nel/net/message.h +++ b/code/nel/include/nel/net/message.h @@ -146,7 +146,7 @@ public: return _LengthR; } - virtual sint32 getPos () const throw(NLMISC::EStream) + virtual sint32 getPos() const { // return (_BufPos - _Buffer.getPtr()) - _SubMessagePosR; return _Buffer.Pos - _SubMessagePosR; diff --git a/code/nel/include/nel/net/module.h b/code/nel/include/nel/net/module.h index 4493dd966..0b5b158d2 100644 --- a/code/nel/include/nel/net/module.h +++ b/code/nel/include/nel/net/module.h @@ -779,10 +779,10 @@ namespace NLNET // Init base module, init module name bool initModule(const TParsedCommandLine &initInfo); - void plugModule(IModuleSocket *moduleSocket) throw (EModuleAlreadyPluggedHere); + void plugModule(IModuleSocket *moduleSocket); void unplugModule(IModuleSocket *moduleSocket) throw (EModuleNotPluggedHere); void getPluggedSocketList(std::vector &resultList); - void invokeModuleOperation(IModuleProxy *destModule, const NLNET::CMessage &opMsg, NLNET::CMessage &resultMsg) throw (EInvokeFailed); + void invokeModuleOperation(IModuleProxy *destModule, const NLNET::CMessage &opMsg, NLNET::CMessage &resultMsg); void _onModuleUp(IModuleProxy *removedProxy); void _onModuleDown(IModuleProxy *removedProxy); diff --git a/code/nel/include/nel/net/module_gateway.h b/code/nel/include/nel/net/module_gateway.h index a097f8de0..75d386162 100644 --- a/code/nel/include/nel/net/module_gateway.h +++ b/code/nel/include/nel/net/module_gateway.h @@ -346,9 +346,9 @@ namespace NLNET virtual const std::string &getClassName() const =0; /// The gateway send a command message to the transport - virtual void onCommand(const CMessage &command) throw (EInvalidCommand) = 0; + virtual void onCommand(const CMessage &command) = 0; /// The gateway send a textual command to the transport - virtual bool onCommand(const TParsedCommandLine &command) throw (EInvalidCommand) = 0; + virtual bool onCommand(const TParsedCommandLine &command) = 0; /// The gateway update the transport regularly virtual void update() =0; diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d.h b/code/nel/src/3d/driver/direct3d/driver_direct3d.h index a4d9dbaeb..6621ab6cb 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d.h +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d.h @@ -849,7 +849,7 @@ public: // Mode initialisation, requests virtual bool init (uintptr_t windowIcon = 0, emptyProc exitFunc = 0); - virtual bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable) throw(EBadDisplay); + virtual bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable virtual bool release(); virtual bool setMode(const GfxMode& mode); virtual bool getModes(std::vector &modes); diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.h b/code/nel/src/3d/driver/opengl/driver_opengl.h index 68e6b0edf..a03077544 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl.h @@ -325,7 +325,7 @@ public: virtual void disableHardwareVertexArrayAGP(); virtual void disableHardwareTextureShader(); - virtual bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable) throw(EBadDisplay); + virtual bool setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable); virtual bool setMode(const GfxMode& mode); virtual bool getModes(std::vector &modes); virtual bool getCurrentScreenMode(GfxMode &mode); diff --git a/code/nel/src/gui/lua_object.cpp b/code/nel/src/gui/lua_object.cpp index c957c3f2c..5417ba0c5 100644 --- a/code/nel/src/gui/lua_object.cpp +++ b/code/nel/src/gui/lua_object.cpp @@ -271,7 +271,7 @@ namespace NLGUI } // ************************************************* - CLuaObject CLuaObject::at(const char *key) const throw(ELuaNotATable) + CLuaObject CLuaObject::at(const char *key) const { if (!isEnumerable()) throw ELuaNotATable(NLMISC::toString("Can't get key '%s' in object '%s' because type is '%s', it is not a table.", key, getId().c_str(), getTypename()).c_str()); return operator[](key); @@ -286,7 +286,7 @@ namespace NLGUI } // ************************************************* - CLuaObject CLuaObject::newTable(const char *tableName) throw(ELuaNotATable) + CLuaObject CLuaObject::newTable(const char *tableName) { nlassert(tableName); nlassert(isValid()); @@ -301,7 +301,7 @@ namespace NLGUI } // ************************************************* - void CLuaObject::setValue(const char *key, const CLuaObject &value) throw(ELuaNotATable) + void CLuaObject::setValue(const char *key, const CLuaObject &value) { nlassert(key); nlassert(isValid()); @@ -331,7 +331,7 @@ namespace NLGUI } // ************************************************* - void CLuaObject::setValue(const char *key, const char *value) throw(ELuaNotATable) + void CLuaObject::setValue(const char *key, const char *value) { nlassert(value); nlassert(key); @@ -346,13 +346,13 @@ namespace NLGUI } // ************************************************* - void CLuaObject::setValue(const char *key, const std::string &value) throw(ELuaNotATable) + void CLuaObject::setValue(const char *key, const std::string &value) { setValue(key, value.c_str()); } // ************************************************* - void CLuaObject::setValue(const char *key, bool value) throw(ELuaNotATable) + void CLuaObject::setValue(const char *key, bool value) { nlassert(key); nlassert(isValid()); @@ -366,7 +366,7 @@ namespace NLGUI } // ************************************************* - void CLuaObject::setValue(const char *key, TLuaWrappedFunction value) throw(ELuaNotATable) + void CLuaObject::setValue(const char *key, TLuaWrappedFunction value) { nlassert(key); nlassert(isValid()); @@ -380,7 +380,7 @@ namespace NLGUI } // ************************************************* - void CLuaObject::setValue(const char *key, double value) throw(ELuaNotATable) + void CLuaObject::setValue(const char *key, double value) { nlassert(key); nlassert(isValid()); @@ -394,7 +394,7 @@ namespace NLGUI } // ************************************************* - void CLuaObject::setValue(const char *key, uint32 value) throw(ELuaNotATable) + void CLuaObject::setValue(const char *key, uint32 value) { nlassert(key); nlassert(isValid()); @@ -408,7 +408,7 @@ namespace NLGUI } // ************************************************* - void CLuaObject::setValue(const char *key, sint32 value) throw(ELuaNotATable) + void CLuaObject::setValue(const char *key, sint32 value) { nlassert(key); nlassert(isValid()); @@ -422,7 +422,7 @@ namespace NLGUI } // ************************************************* - void CLuaObject::setValue(const char *key, sint64 value) throw(ELuaNotATable) + void CLuaObject::setValue(const char *key, sint64 value) { nlassert(key); nlassert(isValid()); @@ -436,7 +436,7 @@ namespace NLGUI } // ************************************************* - void CLuaObject::eraseValue(const char *key) throw(ELuaNotATable) + void CLuaObject::eraseValue(const char *key) { nlassert(isValid()); nlassert(key); diff --git a/code/nel/src/misc/file.cpp b/code/nel/src/misc/file.cpp index 727c02f83..722043fd8 100644 --- a/code/nel/src/misc/file.cpp +++ b/code/nel/src/misc/file.cpp @@ -453,7 +453,7 @@ void CIFile::serialBit(bool &bit) throw(EReadError) } // ====================================================================================================== -bool CIFile::seek (sint32 offset, IStream::TSeekOrigin origin) const throw(EStream) +bool CIFile::seek (sint32 offset, IStream::TSeekOrigin origin) const { if ((_CacheFileOnOpen) && (_Cache == NULL)) return false; diff --git a/code/nel/src/misc/mem_stream.cpp b/code/nel/src/misc/mem_stream.cpp index 49e19f523..dd81334d1 100644 --- a/code/nel/src/misc/mem_stream.cpp +++ b/code/nel/src/misc/mem_stream.cpp @@ -107,7 +107,7 @@ void CMemStream::serialBit(bool &bit) * (to prevent from an "inside serial" to increment it). * Then a seek(end) would get back to the pointer. */ -bool CMemStream::seek (sint32 offset, TSeekOrigin origin) const throw(EStream) +bool CMemStream::seek (sint32 offset, TSeekOrigin origin) const { switch (origin) { diff --git a/code/ryzom/client/src/camera_recorder.cpp b/code/ryzom/client/src/camera_recorder.cpp index 12cd4ff01..8f427c321 100644 --- a/code/ryzom/client/src/camera_recorder.cpp +++ b/code/ryzom/client/src/camera_recorder.cpp @@ -56,7 +56,7 @@ public: CVector Heading; //CVMatrix Matrix; public: - void serial(NLMISC::IStream &f) throw(EStream) + void serial(NLMISC::IStream &f) { f.serial(Date); f.serial(Pos); diff --git a/code/ryzom/client/src/gateway_fec_transport.cpp b/code/ryzom/client/src/gateway_fec_transport.cpp index 26104216e..fa15c465b 100644 --- a/code/ryzom/client/src/gateway_fec_transport.cpp +++ b/code/ryzom/client/src/gateway_fec_transport.cpp @@ -216,13 +216,13 @@ public: } } - void onCommand(const CMessage &/* command */) throw (IGatewayTransport::EInvalidCommand) + void onCommand(const CMessage &/* command */) { // nothing done for now throw EInvalidCommand(); } /// The gateway send a textual command to the transport - bool onCommand(const TParsedCommandLine &command) throw (IGatewayTransport::EInvalidCommand) + bool onCommand(const TParsedCommandLine &command) { if (command.SubParams.size() < 1) throw EInvalidCommand(); @@ -256,7 +256,7 @@ public: } /// Open the connection by intercepting client gateway message - void open() throw (ETransportError) + void open() { if (_Open) { diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index 5cf77aae7..6a3500ae0 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -101,7 +101,7 @@ struct EPatchDownloadException : public Exception { EPatchDownloadException() : Exception( "Download Error" ) {} EPatchDownloadException( const std::string& str ) : Exception( str ) {} - virtual ~EPatchDownloadException() throw() {} + virtual ~EPatchDownloadException() {} }; diff --git a/code/ryzom/client/src/r2/editor.cpp b/code/ryzom/client/src/r2/editor.cpp index dc81eeb38..68214151c 100644 --- a/code/ryzom/client/src/r2/editor.cpp +++ b/code/ryzom/client/src/r2/editor.cpp @@ -4370,7 +4370,7 @@ void CEditor::setCurrentTool(CTool *tool) } // ********************************************************************************************************* -CLuaObject CEditor::getClasses() throw(ELuaError) +CLuaObject CEditor::getClasses() { //H_AUTO(R2_getClasses_throw) CHECK_EDITOR diff --git a/code/ryzom/client/src/r2/editor.h b/code/ryzom/client/src/r2/editor.h index 48a9c6a50..cd19f6c71 100644 --- a/code/ryzom/client/src/r2/editor.h +++ b/code/ryzom/client/src/r2/editor.h @@ -421,7 +421,7 @@ public: // get table for registry in lua environment CLuaObject &getRegistry() { return _Registry; } // get lua classes (the r2.Classes table) - CLuaObject getClasses() throw(ELuaError); + CLuaObject getClasses(); // get R2 environment (the 'r2' table into lua global environment) CLuaObject &getEnv(); // get the config table (that is the 'r2.Config' table) diff --git a/code/ryzom/server/src/ai_service/ai_script_comp.h b/code/ryzom/server/src/ai_service/ai_script_comp.h index 834bbacd7..0b02cc722 100644 --- a/code/ryzom/server/src/ai_service/ai_script_comp.h +++ b/code/ryzom/server/src/ai_service/ai_script_comp.h @@ -54,7 +54,7 @@ public: virtual CFightScriptComp *create (const std::string &inStr) throw (ReadFightActionException) = 0; virtual std::string getName () const =0; - static CFightScriptCompReader *getScriptReader (const std::string &str) throw (ReadFightActionException); + static CFightScriptCompReader *getScriptReader (const std::string &str); static CFightScriptComp *createScriptComp (const std::string &str) throw (ReadFightActionException); protected: diff --git a/code/ryzom/server/src/ai_service/script_compiler.h b/code/ryzom/server/src/ai_service/script_compiler.h index 80d83a860..a03de1f8d 100644 --- a/code/ryzom/server/src/ai_service/script_compiler.h +++ b/code/ryzom/server/src/ai_service/script_compiler.h @@ -298,7 +298,7 @@ public: static CToken* getToken (std::string const& tokenName); static NLMISC::CSmartPtr getRule (std::string const& ruleName); - static bool getNextToken (std::string const& text, size_t& index, std::string& tokenName, std::string& textValue) throw (EScriptError); + static bool getNextToken (std::string const& text, size_t& index, std::string& tokenName, std::string& textValue); static std::string const& getOpcodeName (AIVM::CScriptVM::EOpcode const& op); static AIVM::CScriptVM::EOpcode getOpcodeAndValue (std::string const& str, std::string& value); static CScriptNativeFuncParams* getNativeFunc (std::string const& funcName, std::string const& inparams, std::string const& outparams); diff --git a/code/ryzom/server/src/entities_game_service/entity_manager/entity_base.h b/code/ryzom/server/src/entities_game_service/entity_manager/entity_base.h index 05342be92..89d3271ae 100644 --- a/code/ryzom/server/src/entities_game_service/entity_manager/entity_base.h +++ b/code/ryzom/server/src/entities_game_service/entity_manager/entity_base.h @@ -521,36 +521,36 @@ public: * \param var is the name of the variable * \return ref on the stat value */ - sint32& lookupStat( const std::string& stat ) throw (EInvalidStat); + sint32& lookupStat( const std::string& stat); /** * get a reference on a characterristics value * \param c is enum of characteristic, st is enum of subtype of characterisitics (like max, current..) * \return ref on the stat value */ - sint32& lookupStat( CHARACTERISTICS::TCharacteristics c, SCharacteristicsAndScores::TCharacteristicsAndScoreSubType st ) throw (CEntityBase::EInvalidStat); + sint32& lookupStat( CHARACTERISTICS::TCharacteristics c, SCharacteristicsAndScores::TCharacteristicsAndScoreSubType st); /** * get a reference on a scores value * \param score is enum of score, st is enum of subtype of score (like max, current..) * \return ref on the stat value */ - sint32& lookupStat( SCORES::TScores score, SCharacteristicsAndScores::TCharacteristicsAndScoreSubType st ) throw (CEntityBase::EInvalidStat); + sint32& lookupStat( SCORES::TScores score, SCharacteristicsAndScores::TCharacteristicsAndScoreSubType st); /** * get a reference on a skill value * \param skill is enum of Skills, st is enum of subtype of skill (like base, current..) * \return ref on the stat value */ - sint32& lookupStat( SKILLS::ESkills skill, SSkill::ESkillSubType st ) throw (CEntityBase::EInvalidStat); + sint32& lookupStat( SKILLS::ESkills skill, SSkill::ESkillSubType st); /** * get a reference on a SpecialModifiers value * \param sm is enum of SpecialModifiers * \return ref on the stat value */ - sint32& lookupStat( CSpecialModifiers::ESpecialModifiers sm ) throw (CEntityBase::EInvalidStat); - const sint32& lookupStat( CSpecialModifiers::ESpecialModifiers sm ) const throw (CEntityBase::EInvalidStat); + sint32& lookupStat( CSpecialModifiers::ESpecialModifiers sm); + const sint32& lookupStat( CSpecialModifiers::ESpecialModifiers sm) const; /// accessors on hp (read only) inline sint32 currentHp() const { return _PhysScores._PhysicalScores[SCORES::hit_points].Current;} diff --git a/code/ryzom/server/src/entities_game_service/shop_type/item_for_sale.h b/code/ryzom/server/src/entities_game_service/shop_type/item_for_sale.h index 834c27dd1..3fffe22e7 100644 --- a/code/ryzom/server/src/entities_game_service/shop_type/item_for_sale.h +++ b/code/ryzom/server/src/entities_game_service/shop_type/item_for_sale.h @@ -83,7 +83,7 @@ public: virtual void setContinent( CONTINENT::TContinent continent ) = 0; // // serial -// virtual void serial(NLMISC::IStream &f) throw(NLMISC::EStream ) = 0; +// virtual void serial(NLMISC::IStream &f) = 0; // set item for sale virtual void itemForSale( uint32 price, uint32 retirePrice, CGameItemPtr item, uint32 quantity, const NLMISC::CEntityId& id, CONTINENT::TContinent continent, uint32 identifier ) = 0; @@ -190,7 +190,7 @@ public: void itemForSale( uint32 price, uint32 retirePrice, CGameItemPtr item, uint32 quantity, const NLMISC::CEntityId& id, CONTINENT::TContinent continent, uint32 identifier ); // serial -// void serial(NLMISC::IStream &f) throw(NLMISC::EStream ); +// void serial(NLMISC::IStream &f); // cast operator // const IItemTrade * operator = ( CItemForSale * i ) const { return (IItemTrade *) i; } diff --git a/code/ryzom/server/src/entities_game_service/shop_type/items_for_sale.h b/code/ryzom/server/src/entities_game_service/shop_type/items_for_sale.h index d8e02b4f6..6de4e8380 100644 --- a/code/ryzom/server/src/entities_game_service/shop_type/items_for_sale.h +++ b/code/ryzom/server/src/entities_game_service/shop_type/items_for_sale.h @@ -55,7 +55,7 @@ public: const std::vector< TItemTradePtr >& getContent() const { return _ItemsForSale; } // serial - void serial(NLMISC::IStream &f) throw(NLMISC::EStream ); + void serial(NLMISC::IStream &f); // check coherency between CDynamicItems and CItemsForSale of character, assume CItemsForSale is a reference void checkSellStore( NLMISC::CEntityId charId ); From c4888b2d5b82a9426b17e9d07d5986e4fe044a0c Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 8 Aug 2018 20:54:09 +0200 Subject: [PATCH 3/5] Fixed: Warnings, throw(type) deprecated in C++11 and removed in C++17 --HG-- branch : develop --- code/nel/include/nel/misc/smart_ptr.h | 6 +++--- .../nel/src/3d/driver/direct3d/driver_direct3d.cpp | 2 +- .../src/3d/driver/opengl/driver_opengl_window.cpp | 2 +- code/nel/src/3d/dru.cpp | 6 +++--- code/nel/src/3d/landscape.cpp | 4 ++-- code/nel/src/3d/nelu.cpp | 4 ++-- code/nel/src/gui/lua_ihm.cpp | 2 +- code/nel/src/gui/lua_object.cpp | 4 ++-- code/nel/src/misc/file.cpp | 14 +++++++------- code/nel/src/misc/string_mapper.cpp | 4 ++-- code/nel/src/net/module.cpp | 6 +++--- code/nel/src/net/module_gateway_transport.cpp | 10 +++++----- code/nel/src/net/module_l5_transport.cpp | 6 +++--- .../tools/3d/object_viewer/particle_workspace.h | 2 +- .../ryzom/server/src/ai_service/ai_script_comp.cpp | 2 +- .../server/src/ai_service/script_compiler.cpp | 2 +- .../entity_manager/entity_base.cpp | 12 ++++++------ .../shop_type/item_for_sale.cpp | 2 +- .../shop_type/item_for_sale.h | 2 +- .../shop_type/items_for_sale.cpp | 2 +- .../src/frontend_service/gateway_fes_transport.cpp | 6 +++--- .../server/src/input_output_service/chat_manager.h | 2 +- .../server/build_spell_sheet/build_spell_sheet.cpp | 6 +++--- .../object_viewer/particle_system/particle_node.h | 2 +- 24 files changed, 55 insertions(+), 55 deletions(-) diff --git a/code/nel/include/nel/misc/smart_ptr.h b/code/nel/include/nel/misc/smart_ptr.h index 2273cebeb..b0fc1c301 100644 --- a/code/nel/include/nel/misc/smart_ptr.h +++ b/code/nel/include/nel/misc/smart_ptr.h @@ -226,7 +226,7 @@ public: std::string toString() { if(Ptr) return toString(*Ptr); else return ""; } // serial using serialPtr - void serialPtr(NLMISC::IStream &f) throw(NLMISC::EStream ) + void serialPtr(NLMISC::IStream &f) { T* obj= NULL; if(f.isReading()) @@ -242,7 +242,7 @@ public: } } // serial using serialPloyPtr - void serialPolyPtr(NLMISC::IStream &f) throw(NLMISC::EStream ) + void serialPolyPtr(NLMISC::IStream &f) { T* obj= NULL; if(f.isReading()) @@ -337,7 +337,7 @@ public: void kill(); // serial using serialPloyPtr - void serialPolyPtr(NLMISC::IStream &f) throw(NLMISC::EStream ) + void serialPolyPtr(NLMISC::IStream &f) { T* obj= NULL; if(f.isReading()) diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp index be7a74722..7a4618683 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp @@ -1328,7 +1328,7 @@ const D3DFORMAT FinalPixelFormat[ITexture::UploadFormatCount][CDriverD3D::FinalP // *************************************************************************** -bool CDriverD3D::setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable) throw(EBadDisplay) +bool CDriverD3D::setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool resizeable) { H_AUTO_D3D(CDriver3D_setDisplay); diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index a7eb6e62a..3d1803a2a 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -611,7 +611,7 @@ void CDriverGL::setWindowIcon(const std::vector &bitmaps) } // -------------------------------------------------- -bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool resizeable) throw(EBadDisplay) +bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool resizeable) { H_AUTO_OGL(CDriverGL_setDisplay) diff --git a/code/nel/src/3d/dru.cpp b/code/nel/src/3d/dru.cpp index 15ccbfe01..54248c001 100644 --- a/code/nel/src/3d/dru.cpp +++ b/code/nel/src/3d/dru.cpp @@ -77,7 +77,7 @@ extern IDriver* createGlEsDriverInstance (); #endif // *************************************************************************** -IDriver *CDRU::createGlDriver() throw (EDru) +IDriver *CDRU::createGlDriver() { #ifdef NL_STATIC @@ -131,7 +131,7 @@ IDriver *CDRU::createGlDriver() throw (EDru) } // *************************************************************************** -IDriver *CDRU::createGlEsDriver() throw (EDru) +IDriver *CDRU::createGlEsDriver() { #ifdef NL_STATIC @@ -188,7 +188,7 @@ IDriver *CDRU::createGlEsDriver() throw (EDru) #ifdef NL_OS_WINDOWS -IDriver *CDRU::createD3DDriver() throw (EDru) +IDriver *CDRU::createD3DDriver() { #ifdef NL_STATIC diff --git a/code/nel/src/3d/landscape.cpp b/code/nel/src/3d/landscape.cpp index 4b597fc2d..75e71920a 100644 --- a/code/nel/src/3d/landscape.cpp +++ b/code/nel/src/3d/landscape.cpp @@ -2423,7 +2423,7 @@ void CLandscape::checkZoneBinds(CZone &curZone, EBadBind &bindError) // *************************************************************************** -void CLandscape::checkBinds() throw(EBadBind) +void CLandscape::checkBinds() { EBadBind bindError; @@ -2439,7 +2439,7 @@ void CLandscape::checkBinds() throw(EBadBind) // *************************************************************************** -void CLandscape::checkBinds(uint16 zoneId) throw(EBadBind) +void CLandscape::checkBinds(uint16 zoneId) { EBadBind bindError; diff --git a/code/nel/src/3d/nelu.cpp b/code/nel/src/3d/nelu.cpp index 8cb6e0968..7807a5ef7 100644 --- a/code/nel/src/3d/nelu.cpp +++ b/code/nel/src/3d/nelu.cpp @@ -51,7 +51,7 @@ CEventServer CNELU::EventServer; CEventListenerAsync CNELU::AsyncListener; -bool CNELU::initDriver (uint w, uint h, uint bpp, bool windowed, nlWindow systemWindow, bool offscreen, bool direct3d) throw(EDru) +bool CNELU::initDriver (uint w, uint h, uint bpp, bool windowed, nlWindow systemWindow, bool offscreen, bool direct3d) { // Init debug system // NLMISC::InitDebug(); @@ -183,7 +183,7 @@ void CNELU::releaseDriver() } } -bool CNELU::init (uint w, uint h, CViewport viewport, uint bpp, bool windowed, nlWindow systemWindow, bool offscreen, bool direct3d) throw(EDru) +bool CNELU::init (uint w, uint h, CViewport viewport, uint bpp, bool windowed, nlWindow systemWindow, bool offscreen, bool direct3d) { NL3D::registerSerial3d(); if (initDriver(w,h,bpp,windowed,systemWindow,offscreen,direct3d)) diff --git a/code/nel/src/gui/lua_ihm.cpp b/code/nel/src/gui/lua_ihm.cpp index 0b4a1d0dc..4a51d221f 100644 --- a/code/nel/src/gui/lua_ihm.cpp +++ b/code/nel/src/gui/lua_ihm.cpp @@ -1434,7 +1434,7 @@ namespace NLGUI } // *************************************************************************** - void CLuaIHM::luaValueToReflectedProperty(CLuaState &ls, int stackIndex, CReflectable &target, const CReflectedProperty &property) throw(ELuaIHMException) + void CLuaIHM::luaValueToReflectedProperty(CLuaState &ls, int stackIndex, CReflectable &target, const CReflectedProperty &property) { //H_AUTO(Lua_property_throw) if(ls.isNil(stackIndex)) diff --git a/code/nel/src/gui/lua_object.cpp b/code/nel/src/gui/lua_object.cpp index 5417ba0c5..805e38ceb 100644 --- a/code/nel/src/gui/lua_object.cpp +++ b/code/nel/src/gui/lua_object.cpp @@ -222,7 +222,7 @@ namespace NLGUI } // ************************************************* - CLuaEnumeration CLuaObject::enumerate() throw(ELuaNotATable) + CLuaEnumeration CLuaObject::enumerate() { if (!isEnumerable()) { @@ -317,7 +317,7 @@ namespace NLGUI } // ************************************************* - void CLuaObject::setNil(const char *key) throw(ELuaNotATable) + void CLuaObject::setNil(const char *key) { nlassert(key); nlassert(isValid()); diff --git a/code/nel/src/misc/file.cpp b/code/nel/src/misc/file.cpp index 722043fd8..414a10e5a 100644 --- a/code/nel/src/misc/file.cpp +++ b/code/nel/src/misc/file.cpp @@ -401,7 +401,7 @@ bool CIFile::eof () } // ====================================================================================================== -void CIFile::serialBuffer(uint8 *buf, uint len) throw(EReadError) +void CIFile::serialBuffer(uint8 *buf, uint len) { if (len == 0) return; @@ -444,7 +444,7 @@ void CIFile::serialBuffer(uint8 *buf, uint len) throw(EReadError) } // ====================================================================================================== -void CIFile::serialBit(bool &bit) throw(EReadError) +void CIFile::serialBit(bool &bit) { // Simple for now. uint8 v=bit; @@ -485,7 +485,7 @@ bool CIFile::seek (sint32 offset, IStream::TSeekOrigin origin) const } // ====================================================================================================== -sint32 CIFile::getPos () const throw(EStream) +sint32 CIFile::getPos () const { return _ReadPos; } @@ -652,7 +652,7 @@ void COFile::flush() // ====================================================================================================== -void COFile::serialBuffer(uint8 *buf, uint len) throw(EWriteError) +void COFile::serialBuffer(uint8 *buf, uint len) { if(!_F) throw EFileNotOpened(_FileName); @@ -667,14 +667,14 @@ void COFile::serialBuffer(uint8 *buf, uint len) throw(EWriteError) } } // ====================================================================================================== -void COFile::serialBit(bool &bit) throw(EWriteError) +void COFile::serialBit(bool &bit) { // Simple for now. uint8 v=bit; serialBuffer(&v, 1); } // ====================================================================================================== -bool COFile::seek (sint32 offset, IStream::TSeekOrigin origin) const throw(EStream) +bool COFile::seek (sint32 offset, IStream::TSeekOrigin origin) const { if (_F) { @@ -701,7 +701,7 @@ bool COFile::seek (sint32 offset, IStream::TSeekOrigin origin) const throw(EStr return false; } // ====================================================================================================== -sint32 COFile::getPos () const throw(EStream) +sint32 COFile::getPos () const { if (_F) { diff --git a/code/nel/src/misc/string_mapper.cpp b/code/nel/src/misc/string_mapper.cpp index 6e59f7bab..39931efd2 100644 --- a/code/nel/src/misc/string_mapper.cpp +++ b/code/nel/src/misc/string_mapper.cpp @@ -211,7 +211,7 @@ void CStaticStringMapper::clear() } // **************************************************************************** -void CStaticStringMapper::serial(IStream &f, TSStringId &strId) throw(EStream) +void CStaticStringMapper::serial(IStream &f, TSStringId &strId) { std::string tmp; if (f.isReading()) @@ -227,7 +227,7 @@ void CStaticStringMapper::serial(IStream &f, TSStringId &strId) throw(EStream) } // **************************************************************************** -void CStaticStringMapper::serial(IStream &f, std::vector &strIdVect) throw(EStream) +void CStaticStringMapper::serial(IStream &f, std::vector &strIdVect) { std::vector vsTmp; std::string sTmp; diff --git a/code/nel/src/net/module.cpp b/code/nel/src/net/module.cpp index 1b5e03bec..b5707fea3 100644 --- a/code/nel/src/net/module.cpp +++ b/code/nel/src/net/module.cpp @@ -397,7 +397,7 @@ namespace NLNET } - void CModuleBase::plugModule(IModuleSocket *moduleSocket) throw (EModuleAlreadyPluggedHere) + void CModuleBase::plugModule(IModuleSocket *moduleSocket) { CModuleSocket *sock = dynamic_cast(moduleSocket); nlassert(sock != NULL); @@ -415,7 +415,7 @@ namespace NLNET _ModuleSockets.insert(moduleSocket); } - void CModuleBase::unplugModule(IModuleSocket *moduleSocket) throw (EModuleNotPluggedHere) + void CModuleBase::unplugModule(IModuleSocket *moduleSocket) { CModuleSocket *sock = dynamic_cast(moduleSocket); nlassert(sock != NULL); @@ -443,7 +443,7 @@ namespace NLNET * The call is blocking until receptions of the operation * result message (or a module down) */ - void CModuleBase::invokeModuleOperation(IModuleProxy *destModule, const NLNET::CMessage &opMsg, NLNET::CMessage &resultMsg) throw (EInvokeFailed) + void CModuleBase::invokeModuleOperation(IModuleProxy *destModule, const NLNET::CMessage &opMsg, NLNET::CMessage &resultMsg) { H_AUTO(CModuleBase_invokeModuleOperation); diff --git a/code/nel/src/net/module_gateway_transport.cpp b/code/nel/src/net/module_gateway_transport.cpp index d9029285f..08ff51eeb 100644 --- a/code/nel/src/net/module_gateway_transport.cpp +++ b/code/nel/src/net/module_gateway_transport.cpp @@ -184,13 +184,13 @@ namespace NLNET } } - void onCommand(const CMessage &/* command */) throw (EInvalidCommand) + void onCommand(const CMessage &/* command */) { // nothing done for now throw EInvalidCommand(); } /// The gateway send a textual command to the transport - bool onCommand(const TParsedCommandLine &command) throw (EInvalidCommand) + bool onCommand(const TParsedCommandLine &command) { if (command.SubParams.size() < 1) throw EInvalidCommand(); @@ -218,7 +218,7 @@ namespace NLNET } /// Open the server by starting listing for incoming connection on the specified port - void openServer(uint16 port) throw (ETransportError) + void openServer(uint16 port) { if (_CallbackServer.get() != NULL) throw ETransportError("openServer : The server is already open"); @@ -607,13 +607,13 @@ namespace NLNET } } - void onCommand(const CMessage &/* command */) throw (EInvalidCommand) + void onCommand(const CMessage &/* command */) { // nothing done for now throw EInvalidCommand(); } /// The gateway send a textual command to the transport - bool onCommand(const TParsedCommandLine &command) throw (EInvalidCommand) + bool onCommand(const TParsedCommandLine &command) { if (command.SubParams.size() < 1) throw EInvalidCommand(); diff --git a/code/nel/src/net/module_l5_transport.cpp b/code/nel/src/net/module_l5_transport.cpp index 5eddabc9f..e902263c7 100644 --- a/code/nel/src/net/module_l5_transport.cpp +++ b/code/nel/src/net/module_l5_transport.cpp @@ -218,13 +218,13 @@ namespace NLNET } } - void onCommand(const CMessage &/* command */) throw (EInvalidCommand) + void onCommand(const CMessage &/* command */) { // nothing done for now throw EInvalidCommand(); } /// The gateway send a textual command to the transport - bool onCommand(const TParsedCommandLine &command) throw (EInvalidCommand) + bool onCommand(const TParsedCommandLine &command) { if (command.SubParams.size() < 1) throw EInvalidCommand(); @@ -255,7 +255,7 @@ namespace NLNET /// Open the server by establishing route with all known services - void open(const std::string &subNetName) throw (ETransportError) + void open(const std::string &subNetName) { H_AUTO(L5_open); diff --git a/code/nel/tools/3d/object_viewer/particle_workspace.h b/code/nel/tools/3d/object_viewer/particle_workspace.h index 694aab986..3508746d5 100644 --- a/code/nel/tools/3d/object_viewer/particle_workspace.h +++ b/code/nel/tools/3d/object_viewer/particle_workspace.h @@ -186,7 +186,7 @@ public: * * \return pointer to new node, or NULL if already inserted */ - CNode *addNode(const std::string &filenameWithFullPath) throw( NLMISC::Exception); + CNode *addNode(const std::string &filenameWithFullPath); // remove a node by its index void removeNode(uint index); // remove a node by its pointer diff --git a/code/ryzom/server/src/ai_service/ai_script_comp.cpp b/code/ryzom/server/src/ai_service/ai_script_comp.cpp index 87cbb939d..d076e6832 100644 --- a/code/ryzom/server/src/ai_service/ai_script_comp.cpp +++ b/code/ryzom/server/src/ai_service/ai_script_comp.cpp @@ -1066,7 +1066,7 @@ void CFightScript::add(CFightScriptCompReader *reader) } -CFightScriptCompReader *CFightScriptCompReader::getScriptReader (const string &str) throw (ReadFightActionException) +CFightScriptCompReader *CFightScriptCompReader::getScriptReader (const string &str) { CFightScript::TFightScriptMap::iterator it=CFightScript::_ScriptCompList.find(str); if (it==CFightScript::_ScriptCompList.end()) diff --git a/code/ryzom/server/src/ai_service/script_compiler.cpp b/code/ryzom/server/src/ai_service/script_compiler.cpp index 7ba10f149..bafdefd92 100644 --- a/code/ryzom/server/src/ai_service/script_compiler.cpp +++ b/code/ryzom/server/src/ai_service/script_compiler.cpp @@ -1279,7 +1279,7 @@ static void displayErrorLinesForIndex(const string &text, size_t &index) } -bool CCompiler::getNextToken(const string &text, size_t &index, string &tokenName, string &textValue) throw (EScriptError) +bool CCompiler::getNextToken(const string &text, size_t &index, string &tokenName, string &textValue) { char c=text.at(index); while (c==' '||c=='\n'||c=='\r'||c=='\t') // to avoid blanks, returns and Tabs. diff --git a/code/ryzom/server/src/entities_game_service/entity_manager/entity_base.cpp b/code/ryzom/server/src/entities_game_service/entity_manager/entity_base.cpp index 374b00295..069933e2b 100644 --- a/code/ryzom/server/src/entities_game_service/entity_manager/entity_base.cpp +++ b/code/ryzom/server/src/entities_game_service/entity_manager/entity_base.cpp @@ -394,7 +394,7 @@ void CEntityBase::setTarget( const NLMISC::CEntityId& targetId, bool sendMessage // lookupStat : // //--------------------------------------------------- -sint32& CEntityBase::lookupStat( const string& var ) throw (CEntityBase::EInvalidStat) +sint32& CEntityBase::lookupStat( const string& var) { // TODO Alain: optimize this... uint i; @@ -562,7 +562,7 @@ sint32& CEntityBase::lookupStat( const string& var ) throw (CEntityBase::EInvali // lookupStat for Characteristics: // //--------------------------------------------------- -sint32& CEntityBase::lookupStat( CHARACTERISTICS::TCharacteristics c, SCharacteristicsAndScores::TCharacteristicsAndScoreSubType st ) throw (CEntityBase::EInvalidStat) +sint32& CEntityBase::lookupStat( CHARACTERISTICS::TCharacteristics c, SCharacteristicsAndScores::TCharacteristicsAndScoreSubType st) { if( c < CHARACTERISTICS::NUM_CHARACTERISTICS ) { @@ -601,7 +601,7 @@ sint32& CEntityBase::lookupStat( CHARACTERISTICS::TCharacteristics c, SCharacter // lookupStat for Scores: // //--------------------------------------------------- -sint32& CEntityBase::lookupStat( SCORES::TScores score, SCharacteristicsAndScores::TCharacteristicsAndScoreSubType st ) throw (CEntityBase::EInvalidStat) +sint32& CEntityBase::lookupStat( SCORES::TScores score, SCharacteristicsAndScores::TCharacteristicsAndScoreSubType st) { if( score < SCORES::NUM_SCORES ) { @@ -640,7 +640,7 @@ sint32& CEntityBase::lookupStat( SCORES::TScores score, SCharacteristicsAndScore // lookupStat for Skills: // //--------------------------------------------------- -sint32& CEntityBase::lookupStat( SKILLS::ESkills skill, SSkill::ESkillSubType st ) throw (CEntityBase::EInvalidStat) +sint32& CEntityBase::lookupStat( SKILLS::ESkills skill, SSkill::ESkillSubType st) { /* enum ESkillSubType { @@ -675,7 +675,7 @@ sint32& CEntityBase::lookupStat( SKILLS::ESkills skill, SSkill::ESkillSubType st // lookupStat for SpecialModifiers: // //--------------------------------------------------- -sint32& CEntityBase::lookupStat( CSpecialModifiers::ESpecialModifiers sm ) throw (CEntityBase::EInvalidStat) +sint32& CEntityBase::lookupStat( CSpecialModifiers::ESpecialModifiers sm) { switch( sm ) { @@ -738,7 +738,7 @@ sint32& CEntityBase::lookupStat( CSpecialModifiers::ESpecialModifiers sm ) throw throw CEntityBase::EInvalidStat() ; } // lookupStat // -const sint32& CEntityBase::lookupStat( CSpecialModifiers::ESpecialModifiers sm ) const throw (CEntityBase::EInvalidStat) +const sint32& CEntityBase::lookupStat( CSpecialModifiers::ESpecialModifiers sm) const { return const_cast(this)->lookupStat(sm); } diff --git a/code/ryzom/server/src/entities_game_service/shop_type/item_for_sale.cpp b/code/ryzom/server/src/entities_game_service/shop_type/item_for_sale.cpp index 2844db92c..c2464c0ee 100644 --- a/code/ryzom/server/src/entities_game_service/shop_type/item_for_sale.cpp +++ b/code/ryzom/server/src/entities_game_service/shop_type/item_for_sale.cpp @@ -93,7 +93,7 @@ void CItemForSale::setAvailable( bool a ) } //----------------------------------------------------------------------------- -//void CItemForSale::serial(NLMISC::IStream &f) throw(NLMISC::EStream ) +//void CItemForSale::serial(NLMISC::IStream &f) //{ // f.serial( _PriceInfo ); // f.serial( _RetirePrice ); diff --git a/code/ryzom/server/src/entities_game_service/shop_type/item_for_sale.h b/code/ryzom/server/src/entities_game_service/shop_type/item_for_sale.h index 3fffe22e7..7387a9a10 100644 --- a/code/ryzom/server/src/entities_game_service/shop_type/item_for_sale.h +++ b/code/ryzom/server/src/entities_game_service/shop_type/item_for_sale.h @@ -312,7 +312,7 @@ public: void setContinent( CONTINENT::TContinent ) {} // serial - void serial(NLMISC::IStream &f) throw(NLMISC::EStream ) {} + void serial(NLMISC::IStream &f) {} // set item for sale void itemForSale( uint32 price, uint32 retirePrice, CGameItemPtr item, uint32 quantity, const NLMISC::CEntityId& id, CONTINENT::TContinent continent, uint32 identifier ) {} diff --git a/code/ryzom/server/src/entities_game_service/shop_type/items_for_sale.cpp b/code/ryzom/server/src/entities_game_service/shop_type/items_for_sale.cpp index c247b93ac..61538b674 100644 --- a/code/ryzom/server/src/entities_game_service/shop_type/items_for_sale.cpp +++ b/code/ryzom/server/src/entities_game_service/shop_type/items_for_sale.cpp @@ -96,7 +96,7 @@ NLMISC::CSmartPtr< IItemTrade > CItemsForSale::removeItem( uint32 identifier, ui } //----------------------------------------------------------------------------- -void CItemsForSale::serial(NLMISC::IStream &f) throw(NLMISC::EStream ) +void CItemsForSale::serial(NLMISC::IStream &f) { // YOYO: we should not be here. OLD serial was very buggy. // AlainS ensure me this code is no more called (no write, use PDS instead, and old version diff --git a/code/ryzom/server/src/frontend_service/gateway_fes_transport.cpp b/code/ryzom/server/src/frontend_service/gateway_fes_transport.cpp index a24fd8d51..40cb4dde2 100644 --- a/code/ryzom/server/src/frontend_service/gateway_fes_transport.cpp +++ b/code/ryzom/server/src/frontend_service/gateway_fes_transport.cpp @@ -179,13 +179,13 @@ public: } } - void onCommand(const CMessage &command) throw (EInvalidCommand) + void onCommand(const CMessage &command) { // nothing done for now throw EInvalidCommand(); } /// The gateway send a textual command to the transport - bool onCommand(const TParsedCommandLine &command) throw (EInvalidCommand) + bool onCommand(const TParsedCommandLine &command) { if (command.SubParams.size() < 1) throw EInvalidCommand(); @@ -212,7 +212,7 @@ public: } /// Open the server by intercepting client gateway message - void openServer() throw (ETransportError) + void openServer() { if (OpenTransport() != NULL) throw ETransportError("openServer : a transport is already open !"); diff --git a/code/ryzom/server/src/input_output_service/chat_manager.h b/code/ryzom/server/src/input_output_service/chat_manager.h index 544dbfa2c..658a72d81 100644 --- a/code/ryzom/server/src/input_output_service/chat_manager.h +++ b/code/ryzom/server/src/input_output_service/chat_manager.h @@ -145,7 +145,7 @@ public : * \param gId is the group's id * \return the group */ - CChatGroup& getGroup( const TGroupId& gId );// throw (EChatGroup); + CChatGroup& getGroup( const TGroupId& gId ); /** * Transmit a chat message diff --git a/code/ryzom/tools/server/build_spell_sheet/build_spell_sheet.cpp b/code/ryzom/tools/server/build_spell_sheet/build_spell_sheet.cpp index 5e892410b..6a8383485 100644 --- a/code/ryzom/tools/server/build_spell_sheet/build_spell_sheet.cpp +++ b/code/ryzom/tools/server/build_spell_sheet/build_spell_sheet.cpp @@ -65,7 +65,7 @@ public: return true; } public: - void serial(IStream &f) throw(EStream) + void serial(IStream &f) { for(uint k = 0; k < NumUserParams; ++k) { @@ -87,7 +87,7 @@ public: { return PSName.empty() && UserParams.empty(); } - void serial(IStream &f) throw(EStream) + void serial(IStream &f) { if (!PSName.empty()) writeAtom(f, "PSName", PSName); UserParams.serial(f); @@ -111,7 +111,7 @@ public: } return true; } - void serial(IStream &f) throw(EStream) + void serial(IStream &f) { for(uint k = 0; k < NumFX; ++k) { diff --git a/code/studio/src/plugins/object_viewer/particle_system/particle_node.h b/code/studio/src/plugins/object_viewer/particle_system/particle_node.h index 033802a44..7b164580d 100644 --- a/code/studio/src/plugins/object_viewer/particle_system/particle_node.h +++ b/code/studio/src/plugins/object_viewer/particle_system/particle_node.h @@ -283,7 +283,7 @@ public: /// The node is in the 'unloaded' state, so caller must load it afterward. /// NB : no lookup is done, full path must be provided. /// @return pointer to new node, or NULL if already inserted - CWorkspaceNode *addNode(const std::string &filenameWithFullPath) throw( NLMISC::Exception); + CWorkspaceNode *addNode(const std::string &filenameWithFullPath); /// Remove a node by it's index void removeNode(uint index); From 8a1588c1471b3161248bee5f0b6d3555bb02ecb9 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 8 Aug 2018 20:55:14 +0200 Subject: [PATCH 4/5] Fixed: Also use SSL context callback when manually using Windows CA certs --HG-- branch : develop --- code/nel/src/gui/curl_certificates.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/code/nel/src/gui/curl_certificates.cpp b/code/nel/src/gui/curl_certificates.cpp index f06d92608..5cec3c511 100644 --- a/code/nel/src/gui/curl_certificates.cpp +++ b/code/nel/src/gui/curl_certificates.cpp @@ -88,12 +88,9 @@ namespace NLGUI addCertificatesFrom("CA"); addCertificatesFrom("AuthRoot"); addCertificatesFrom("ROOT"); +#endif - // we manually loaded native CA Certs, don't need to use custom certificates - isUsingOpenSSLBackend = false; -#else isUsingOpenSSLBackend = true; -#endif } else { From 443cc7df65aa5fcc070624fa8b1bbe523b6b9aa2 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 8 Aug 2018 20:55:40 +0200 Subject: [PATCH 5/5] Fixed: Don't throw an exception when a certifcate can't be found --HG-- branch : develop --- code/nel/src/gui/curl_certificates.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/gui/curl_certificates.cpp b/code/nel/src/gui/curl_certificates.cpp index 5cec3c511..7d26e7e5a 100644 --- a/code/nel/src/gui/curl_certificates.cpp +++ b/code/nel/src/gui/curl_certificates.cpp @@ -144,7 +144,7 @@ namespace NLGUI FilesList.push_back(cert); // look for certificate in search paths - string path = CPath::lookup(cert); + string path = CPath::lookup(cert, false); nlinfo("Cert path '%s'", path.c_str()); if (path.empty())