Fix CppCheck in UPnPBase.h

/libretroshare/src/upnp/UPnPBase.cpp:62: warning:
Cppcheck(funcArgOrderDifferent): Function 'CUPnPPortMapping' argument
order different: declaration 'in_port, ex_port, protocol, enabled,
description' definition 'ex_port, in_port, protocol, enabled,
description'
/libretroshare/src/upnp/UPnPBase.h:109: warning:
Cppcheck(noExplicitConstructor): Class 'CUPnPLib' has a constructor with
1 argument that is not explicit.
/libretroshare/src/upnp/UPnPBase.h:577: warning:
Cppcheck(noExplicitConstructor): Class 'CUPnPControlPoint' has a
constructor with 1 argument that is not explicit.
This commit is contained in:
Phenom 2017-07-30 14:41:13 +02:00 committed by csoler
parent 2933861691
commit 72b917de37

View File

@ -66,8 +66,8 @@ private:
public:
CUPnPPortMapping(
int in_port = 0,
int ex_port = 0,
int in_port = 0,
const std::string &protocol = stdEmptyString,
bool enabled = false,
const std::string &description = stdEmptyString);
@ -106,7 +106,7 @@ public:
CUPnPControlPoint &m_ctrlPoint;
public:
CUPnPLib(CUPnPControlPoint &ctrlPoint);
explicit CUPnPLib(CUPnPControlPoint &ctrlPoint);
~CUPnPLib() {}
// Convenience function so we don't have to write explicit calls
@ -574,7 +574,7 @@ public:
CUPnPService *m_WanService;
std::string m_getStateVariableLastResult;
static CUPnPControlPoint *s_CtrlPoint;
CUPnPControlPoint(unsigned short udpPort);
explicit CUPnPControlPoint(unsigned short udpPort);
~CUPnPControlPoint();
char* getInternalIpAddress();
std::string getExternalAddress();