correct use of const functions

This commit is contained in:
Pavol Marko 2004-03-31 18:05:07 +00:00
parent b01c6a27f6
commit b677e5c164
2 changed files with 8 additions and 8 deletions

View File

@ -430,12 +430,12 @@ void EventsMngr::executeEvents()
m_ParseFun = NULL; m_ParseFun = NULL;
} }
int EventsMngr::getArgNum() int EventsMngr::getArgNum() const
{ {
return m_ParsePos + 1; return m_ParsePos + 1;
} }
const char* EventsMngr::getArgString(int a) const char* EventsMngr::getArgString(int a) const
{ {
if ( a < 0 || a > m_ParsePos ) if ( a < 0 || a > m_ParsePos )
return ""; 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 ) if ( a < 0 || a > m_ParsePos )
return 0; 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 ) if ( a < 0 || a > m_ParsePos )
return 0.0f; return 0.0f;

View File

@ -144,10 +144,10 @@ public:
void parseValue(float fValue); void parseValue(float fValue);
void parseValue(const char *sz); void parseValue(const char *sz);
void executeEvents(); void executeEvents();
int getArgNum(); //{ return (parsePos+1); } int getArgNum() const; //{ return (parsePos+1); }
const char* getArgString(int a); const char* getArgString(int a) const;
int getArgInteger(int a); int getArgInteger(int a) const;
float getArgFloat(int a); float getArgFloat(int a) const;
void clearEvents(void); void clearEvents(void);
static int getEventId( const char* msg ); static int getEventId( const char* msg );
}; };