Fixed: Warnings, throw(type) deprecated in C++11 and removed in C++17

--HG--
branch : develop
This commit is contained in:
kervala 2018-08-09 19:38:33 +02:00
parent dcaf417aee
commit 184d3698c9
5 changed files with 12 additions and 33 deletions

View file

@ -213,18 +213,14 @@ namespace NLNET
* Note that a module can be plugged in several socket at the same * Note that a module can be plugged in several socket at the same
* time, but not twice in the same socket. * time, but not twice in the same socket.
*/ */
virtual void plugModule(IModuleSocket *moduleSocket) virtual void plugModule(IModuleSocket *moduleSocket) =0;
throw (EModuleAlreadyPluggedHere)
=0;
/** Unplug this module from the specified socket. /** Unplug this module from the specified socket.
* Note that a module can be plugged in several socket at the same * Note that a module can be plugged in several socket at the same
* time, but not twice in the same socket. * time, but not twice in the same socket.
* Throw an exception if the socket is not currently plug into * Throw an exception if the socket is not currently plug into
* the specified socket. * the specified socket.
*/ */
virtual void unplugModule(IModuleSocket *moduleSocket) virtual void unplugModule(IModuleSocket *moduleSocket) =0;
throw (EModuleNotPluggedHere)
=0;
/** Fill resultList vector with the list of socket into /** Fill resultList vector with the list of socket into
* witch this module is currently plugged. * witch this module is currently plugged.
* This method don't clear the result vector before filling it. * This method don't clear the result vector before filling it.
@ -448,9 +444,7 @@ namespace NLNET
* This method do the job of finding a valid socket to effectively send * This method do the job of finding a valid socket to effectively send
* the message. * the message.
*/ */
virtual void sendModuleMessage(IModule *senderModule, const NLNET::CMessage &message) virtual void sendModuleMessage(IModule *senderModule, const NLNET::CMessage &message) =0;
throw (EModuleNotReachable)
=0;
/** Return the first item of the security item list /** Return the first item of the security item list
* If no security data are available, the method * If no security data are available, the method
@ -879,8 +873,7 @@ namespace NLNET
/** Send a message to the module. /** Send a message to the module.
*/ */
virtual void sendModuleMessage(IModule *senderModule, const NLNET::CMessage &message) virtual void sendModuleMessage(IModule *senderModule, const NLNET::CMessage &message);
throw (EModuleNotReachable);
virtual const TSecurityData *getFirstSecurityData() const virtual const TSecurityData *getFirstSecurityData() const
{ {

View file

@ -42,15 +42,11 @@ namespace NLNET
* If the destination module is not accessible through this socket, * If the destination module is not accessible through this socket,
* an exception is thrown. * an exception is thrown.
*/ */
virtual void sendModuleMessage(IModule *senderModule, TModuleId destModuleProxyId, const NLNET::CMessage &message ) virtual void sendModuleMessage(IModule *senderModule, TModuleId destModuleProxyId, const NLNET::CMessage &message) =0;
throw (EModuleNotPluggedHere)
=0;
/** A plugged module send a message to all the module reachable /** A plugged module send a message to all the module reachable
* with this socket. * with this socket.
*/ */
virtual void broadcastModuleMessage(IModule *senderModule, const NLNET::CMessage &message) virtual void broadcastModuleMessage(IModule *senderModule, const NLNET::CMessage &message) =0;
throw (EModuleNotPluggedHere)
=0;
/** Fill the resultList with the list of module that are /** Fill the resultList with the list of module that are
* reachable with this socket. * reachable with this socket.
@ -95,21 +91,15 @@ namespace NLNET
virtual void _onModulePlugged(const TModulePtr &pluggedModule); virtual void _onModulePlugged(const TModulePtr &pluggedModule);
virtual void _onModuleUnplugged(const TModulePtr &pluggedModule); virtual void _onModuleUnplugged(const TModulePtr &pluggedModule);
virtual void _sendModuleMessage(IModule *senderModule, TModuleId destModuleProxyId, const NLNET::CMessage &message ) virtual void _sendModuleMessage(IModule *senderModule, TModuleId destModuleProxyId, const NLNET::CMessage &message) =0;
throw (EModuleNotPluggedHere, NLNET::EModuleNotReachable)
=0;
virtual void _broadcastModuleMessage(IModule *senderModule, const NLNET::CMessage &message) virtual void _broadcastModuleMessage(IModule *senderModule, const NLNET::CMessage &message) =0;
throw (EModuleNotPluggedHere)
=0;
virtual void sendModuleMessage(IModule *senderModule, TModuleId destModuleProxyId, const NLNET::CMessage &message ) virtual void sendModuleMessage(IModule *senderModule, TModuleId destModuleProxyId, const NLNET::CMessage &message);
throw (EModuleNotPluggedHere);
/** A plugged module send a message to all the module reachable /** A plugged module send a message to all the module reachable
* with this socket. * with this socket.
*/ */
virtual void broadcastModuleMessage(IModule *senderModule, const NLNET::CMessage &message) virtual void broadcastModuleMessage(IModule *senderModule, const NLNET::CMessage &message);
throw (EModuleNotPluggedHere);
}; };

View file

@ -867,7 +867,6 @@ namespace NLNET
} }
void CModuleProxy::sendModuleMessage(IModule *senderModule, const NLNET::CMessage &message) void CModuleProxy::sendModuleMessage(IModule *senderModule, const NLNET::CMessage &message)
throw (EModuleNotReachable)
{ {
H_AUTO(CModuleProxy_sendModuleMessage); H_AUTO(CModuleProxy_sendModuleMessage);

View file

@ -1560,8 +1560,7 @@ namespace NLNET
return getModuleName(); return getModuleName();
} }
void _sendModuleMessage(IModule *senderModule, TModuleId destModuleProxyId, const NLNET::CMessage &message ) void _sendModuleMessage(IModule *senderModule, TModuleId destModuleProxyId, const NLNET::CMessage &message)
throw (EModuleNotReachable, EModuleNotPluggedHere)
{ {
// the socket implementation already checked that the module is plugged here // the socket implementation already checked that the module is plugged here
// just check that the destination module effectively from here // just check that the destination module effectively from here

View file

@ -364,8 +364,7 @@ namespace NLNET
return getModuleName(); return getModuleName();
} }
void _sendModuleMessage(IModule *senderModule, TModuleId destModuleProxyId, const NLNET::CMessage &message ) void _sendModuleMessage(IModule *senderModule, TModuleId destModuleProxyId, const NLNET::CMessage &message)
throw (EModuleNotReachable, EModuleNotPluggedHere)
{ {
TModuleProxies::TAToBMap::const_iterator first(_ModuleProxies.getAToBMap().begin()), last(_ModuleProxies.getAToBMap().end()); TModuleProxies::TAToBMap::const_iterator first(_ModuleProxies.getAToBMap().begin()), last(_ModuleProxies.getAToBMap().end());
for (; first != last && first->first->getModuleProxyId() != destModuleProxyId; ++first) {} for (; first != last && first->first->getModuleProxyId() != destModuleProxyId; ++first) {}
@ -373,7 +372,6 @@ namespace NLNET
throw EModuleNotReachable(); throw EModuleNotReachable();
} }
virtual void _broadcastModuleMessage(IModule * /* senderModule */, const NLNET::CMessage &/* message */) virtual void _broadcastModuleMessage(IModule * /* senderModule */, const NLNET::CMessage &/* message */)
throw (EModuleNotPluggedHere)
{ {
nlstop; nlstop;
} }