From 18b1ec50803714aa836a32a42806b7a8c367d9fd Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 23 Oct 2007 19:28:41 +0000 Subject: -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 --- include/caller.h | 18 +++++++++--------- include/ctables.h | 4 ++-- include/hashcomp.h | 2 +- include/inspircd.h | 9 +-------- include/users.h | 2 +- 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 { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(); }; + class CoreExport NAME : public HandlerBase0 { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(); } #define DEFINE_HANDLER1(NAME, RETURN, V1) \ - class CoreExport NAME : public HandlerBase1 { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1); }; + class CoreExport NAME : public HandlerBase1 { 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 { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2); }; + class CoreExport NAME : public HandlerBase2 { 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 { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3); }; + class CoreExport NAME : public HandlerBase3 { 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 { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4); }; + class CoreExport NAME : public HandlerBase4 { 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 { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5); }; + class CoreExport NAME : public HandlerBase5 { 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 { InspIRCd* Server; public: NAME(InspIRCd* Srv) : Server(Srv) { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5, V6); }; + class CoreExport NAME : public HandlerBase6 { 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 { 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 { 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 { 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 { 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 ¶ms) + virtual CmdResult HandleInternal(const unsigned int /* id */, const std::deque& /* 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 inline std::string ConvNumeric(const T &in) ++out; quotient /= 10; } - if ( in < 0) + if (in < 0) *out++ = '-'; *out = 0; std::reverse(res,out); @@ -98,13 +98,6 @@ inline std::string ConvToStr(const long in) return ConvNumeric(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) 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)) { -- cgit v1.2.3