From b677e5c164af4a97e9d5a6c4ea714f54a5446e63 Mon Sep 17 00:00:00 2001 From: Pavol Marko Date: Wed, 31 Mar 2004 18:05:07 +0000 Subject: [PATCH] correct use of const functions --- amxmodx/CEvent.cpp | 8 ++++---- amxmodx/CEvent.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/amxmodx/CEvent.cpp b/amxmodx/CEvent.cpp index 7f1f384c..875acd10 100755 --- a/amxmodx/CEvent.cpp +++ b/amxmodx/CEvent.cpp @@ -430,12 +430,12 @@ void EventsMngr::executeEvents() m_ParseFun = NULL; } -int EventsMngr::getArgNum() +int EventsMngr::getArgNum() const { return m_ParsePos + 1; } -const char* EventsMngr::getArgString(int a) +const char* EventsMngr::getArgString(int a) const { if ( a < 0 || a > m_ParsePos ) return ""; @@ -455,7 +455,7 @@ const char* EventsMngr::getArgString(int a) } } -int EventsMngr::getArgInteger(int a) +int EventsMngr::getArgInteger(int a) const { if ( a < 0 || a > m_ParsePos ) return 0; @@ -471,7 +471,7 @@ int EventsMngr::getArgInteger(int a) } } -float EventsMngr::getArgFloat(int a) +float EventsMngr::getArgFloat(int a) const { if ( a < 0 || a > m_ParsePos ) return 0.0f; diff --git a/amxmodx/CEvent.h b/amxmodx/CEvent.h index 2c3b8624..c87c5770 100755 --- a/amxmodx/CEvent.h +++ b/amxmodx/CEvent.h @@ -144,10 +144,10 @@ public: void parseValue(float fValue); void parseValue(const char *sz); void executeEvents(); - int getArgNum(); //{ return (parsePos+1); } - const char* getArgString(int a); - int getArgInteger(int a); - float getArgFloat(int a); + int getArgNum() const; //{ return (parsePos+1); } + const char* getArgString(int a) const; + int getArgInteger(int a) const; + float getArgFloat(int a) const; void clearEvents(void); static int getEventId( const char* msg ); };