diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-23 19:28:41 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-23 19:28:41 +0000 |
commit | 18b1ec50803714aa836a32a42806b7a8c367d9fd (patch) | |
tree | c21c53040c335872315ffc503247be8b9096086a | |
parent | e281922d55e302bd823be89895006239248505e3 (diff) |
-pedantic tidyups, lets see if it finds anything worthy of a fix
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8313 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | include/caller.h | 18 | ||||
-rw-r--r-- | include/ctables.h | 4 | ||||
-rw-r--r-- | include/hashcomp.h | 2 | ||||
-rw-r--r-- | include/inspircd.h | 9 | ||||
-rw-r--r-- | include/users.h | 2 | ||||
-rw-r--r-- | src/commands/cmd_stats.cpp | 2 |
6 files changed, 15 insertions, 22 deletions
diff --git a/include/caller.h b/include/caller.h index 5cf08905a..de28f4489 100644 --- a/include/caller.h +++ b/include/caller.h @@ -255,31 +255,31 @@ template <typename ReturnType, typename Param1, typename Param2, typename Param3 */ #define DEFINE_HANDLER0(NAME, RETURN) \ - class CoreExport NAME : public HandlerBase0<RETURN> { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(); }; + class CoreExport NAME : public HandlerBase0<RETURN> { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(); } #define DEFINE_HANDLER1(NAME, RETURN, V1) \ - class CoreExport NAME : public HandlerBase1<RETURN, V1> { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1); }; + class CoreExport NAME : public HandlerBase1<RETURN, V1> { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1); } #define DEFINE_HANDLER2(NAME, RETURN, V1, V2) \ - class CoreExport NAME : public HandlerBase2<RETURN, V1, V2> { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2); }; + class CoreExport NAME : public HandlerBase2<RETURN, V1, V2> { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2); } #define DEFINE_HANDLER3(NAME, RETURN, V1, V2, V3) \ - class CoreExport NAME : public HandlerBase3<RETURN, V1, V2, V3> { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3); }; + class CoreExport NAME : public HandlerBase3<RETURN, V1, V2, V3> { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3); } #define DEFINE_HANDLER4(NAME, RETURN, V1, V2, V3, V4) \ - class CoreExport NAME : public HandlerBase4<RETURN, V1, V2, V3, V4> { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4); }; + class CoreExport NAME : public HandlerBase4<RETURN, V1, V2, V3, V4> { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4); } #define DEFINE_HANDLER5(NAME, RETURN, V1, V2, V3, V4, V5) \ - class CoreExport NAME : public HandlerBase5<RETURN, V1, V2, V3, V4, V5> { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5); }; + class CoreExport NAME : public HandlerBase5<RETURN, V1, V2, V3, V4, V5> { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5); } #define DEFINE_HANDLER6(NAME, RETURN, V1, V2, V3, V4, V5, V6) \ - class CoreExport NAME : public HandlerBase6<RETURN, V1, V2, V3, V4, V5, V6> { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5, V6); }; + class CoreExport NAME : public HandlerBase6<RETURN, V1, V2, V3, V4, V5, V6> { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5, V6); } #define DEFINE_HANDLER7(NAME, RETURN, V1, V2, V3, V4, V5, V6, V7) \ - class CoreExport NAME : public HandlerBase7<RETURN, V1, V2, V3, V4, V5, V6, V7> { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5, V6, V7); }; + class CoreExport NAME : public HandlerBase7<RETURN, V1, V2, V3, V4, V5, V6, V7> { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5, V6, V7); } #define DEFINE_HANDLER8(NAME, RETURN, V1, V2, V3, V4, V5, V6, V7, V8) \ - class CoreExport NAME : public HandlerBase8<RETURN, V1, V2, V3, V4, V5, V6, V7, V8> { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5, V6, V7, V8); }; + class CoreExport NAME : public HandlerBase8<RETURN, V1, V2, V3, V4, V5, V6, V7, V8> { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5, V6, V7, V8); } #endif diff --git a/include/ctables.h b/include/ctables.h index ee972adaa..aafd27e4a 100644 --- a/include/ctables.h +++ b/include/ctables.h @@ -132,7 +132,7 @@ class CoreExport Command : public Extensible * If the command succeeds but should remain local to this server, * return CMD_LOCALONLY. */ - virtual CmdResult HandleInternal(const unsigned int id, const std::deque<classbase*> ¶ms) + virtual CmdResult HandleInternal(const unsigned int /* id */, const std::deque<classbase*>& /* params */) { return CMD_INVALID; } @@ -146,7 +146,7 @@ class CoreExport Command : public Extensible * If the command succeeds but should remain local to this server, * return CMD_LOCALONLY. */ - virtual CmdResult HandleServer(const char** parameters, int pcnt, const std::string &servername) + virtual CmdResult HandleServer(const char** /* parameters */, int /* pcnt */, const std::string& /* servername */) { return CMD_INVALID; } diff --git a/include/hashcomp.h b/include/hashcomp.h index 78792d1ab..00c9b6924 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -546,7 +546,7 @@ namespace irc /** Set free bits mask */ - virtual void SetFreeBits(unsigned char* freebits) { } + virtual void SetFreeBits(unsigned char* freebits) { freebits = freebits; } }; /** Turn _ characters in a string into spaces diff --git a/include/inspircd.h b/include/inspircd.h index eef05116b..67408ad6e 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -77,7 +77,7 @@ template<typename T> inline std::string ConvNumeric(const T &in) ++out; quotient /= 10; } - if ( in < 0) + if (in < 0) *out++ = '-'; *out = 0; std::reverse(res,out); @@ -100,13 +100,6 @@ inline std::string ConvToStr(const long in) /** Template function to convert any input type to std::string */ -inline std::string ConvToStr(const unsigned long in) -{ - return ConvNumeric(in); -} - -/** Template function to convert any input type to std::string - */ inline std::string ConvToStr(const char* in) { return in; diff --git a/include/users.h b/include/users.h index 42dccfeb6..f1dd935e0 100644 --- a/include/users.h +++ b/include/users.h @@ -177,7 +177,7 @@ public: /** Create a new connect class based on an existing connect class. This is required for std::vector (at least under windows). */ - ConnectClass(const ConnectClass& source) : type(source.type), name(source.name), + ConnectClass(const ConnectClass& source) : classbase(), type(source.type), name(source.name), registration_timeout(source.registration_timeout), flood(source.flood), host(source.host), pingtime(source.pingtime), pass(source.pass), threshold(source.threshold), sendqmax(source.sendqmax), recvqmax(source.recvqmax), maxlocal(source.maxlocal), maxglobal(source.maxglobal), maxchans(source.maxchans), diff --git a/src/commands/cmd_stats.cpp b/src/commands/cmd_stats.cpp index 52172df06..fb2e32232 100644 --- a/src/commands/cmd_stats.cpp +++ b/src/commands/cmd_stats.cpp @@ -31,7 +31,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance) return new CommandStats(Instance); } -CmdResult CommandStats::Handle (const char** parameters, int pcnt, User *user) +CmdResult CommandStats::Handle (const char** parameters, int /* pcnt */, User *user) { if (IS_LOCAL(user)) { |