diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2012-08-17 00:03:53 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2013-02-24 17:54:29 +0100 |
| commit | 98042012a6c6e639c9736b32518dd082ca539615 (patch) | |
| tree | 069cdf4a2149dde7c5efcce1df56942f89bc3365 /src/engine/shared | |
| parent | 6af382ade1d350091545dd24ab79020bda7825f2 (diff) | |
| download | zcatch-98042012a6c6e639c9736b32518dd082ca539615.tar.gz zcatch-98042012a6c6e639c9736b32518dd082ca539615.zip | |
cleaned up warnings that clang spits out. some bugs found with it.
Conflicts: src/game/server/gamemodes/ctf.cpp src/game/server/gamemodes/ctf.h
Diffstat (limited to 'src/engine/shared')
| -rw-r--r-- | src/engine/shared/console.cpp | 6 | ||||
| -rw-r--r-- | src/engine/shared/mapchecker.cpp | 1 | ||||
| -rw-r--r-- | src/engine/shared/netban.h | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/engine/shared/console.cpp b/src/engine/shared/console.cpp index 443c5904..3ff3c5b3 100644 --- a/src/engine/shared/console.cpp +++ b/src/engine/shared/console.cpp @@ -16,21 +16,21 @@ const char *CConsole::CResult::GetString(unsigned Index) { - if (Index < 0 || Index >= m_NumArgs) + if (Index >= m_NumArgs) return ""; return m_apArgs[Index]; } int CConsole::CResult::GetInteger(unsigned Index) { - if (Index < 0 || Index >= m_NumArgs) + if (Index >= m_NumArgs) return 0; return str_toint(m_apArgs[Index]); } float CConsole::CResult::GetFloat(unsigned Index) { - if (Index < 0 || Index >= m_NumArgs) + if (Index >= m_NumArgs) return 0.0f; return str_tofloat(m_apArgs[Index]); } diff --git a/src/engine/shared/mapchecker.cpp b/src/engine/shared/mapchecker.cpp index f8ba30ae..5a7d062f 100644 --- a/src/engine/shared/mapchecker.cpp +++ b/src/engine/shared/mapchecker.cpp @@ -6,6 +6,7 @@ #include <engine/storage.h> #include <versionsrv/versionsrv.h> +#include <versionsrv/mapversions.h> #include "datafile.h" #include "memheap.h" diff --git a/src/engine/shared/netban.h b/src/engine/shared/netban.h index 6d690164..70164832 100644 --- a/src/engine/shared/netban.h +++ b/src/engine/shared/netban.h @@ -170,7 +170,7 @@ public: class IStorage *Storage() const { return m_pStorage; } virtual ~CNetBan() {} - virtual void Init(class IConsole *pConsole, class IStorage *pStorage); + void Init(class IConsole *pConsole, class IStorage *pStorage); void Update(); virtual int BanAddr(const NETADDR *pAddr, int Seconds, const char *pReason); |