From 98042012a6c6e639c9736b32518dd082ca539615 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Fri, 17 Aug 2012 00:03:53 +0200 Subject: 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 --- src/engine/shared/console.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/engine/shared/console.cpp') 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]); } -- cgit 1.4.1