removed const from most apis. it was pointless since there were no actual const pointers.

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40621
This commit is contained in:
David Anderson 2007-03-15 04:34:42 +00:00
parent 0bbb4670fc
commit 043b8f255f
9 changed files with 73 additions and 73 deletions

View File

@ -467,42 +467,42 @@ void CPlayer::SetName(const char *name)
m_Name.assign(name);
}
const char *CPlayer::GetName() const
const char *CPlayer::GetName()
{
return m_Name.c_str();
}
const char *CPlayer::GetIPAddress() const
const char *CPlayer::GetIPAddress()
{
return m_Ip.c_str();
}
const char *CPlayer::GetAuthString() const
const char *CPlayer::GetAuthString()
{
return m_AuthID.c_str();
}
edict_t *CPlayer::GetEdict() const
edict_t *CPlayer::GetEdict()
{
return m_pEdict;
}
bool CPlayer::IsInGame() const
bool CPlayer::IsInGame()
{
return m_IsInGame;
}
bool CPlayer::IsConnected() const
bool CPlayer::IsConnected()
{
return m_IsConnected;
}
bool CPlayer::IsAuthorized() const
bool CPlayer::IsAuthorized()
{
return m_IsAuthorized;
}
bool CPlayer::IsFakeClient() const
bool CPlayer::IsFakeClient()
{
return (strcmp(m_AuthID.c_str(), "BOT") == 0);
}
@ -520,7 +520,7 @@ void CPlayer::SetAdminId(AdminId id, bool temporary)
m_TempAdmin = temporary;
}
AdminId CPlayer::GetAdminId() const
AdminId CPlayer::GetAdminId()
{
return m_Admin;
}

View File

@ -32,16 +32,16 @@ class CPlayer : public IGamePlayer
public:
CPlayer();
public:
const char *GetName() const;
const char *GetIPAddress() const;
const char *GetAuthString() const;
edict_t *GetEdict() const;
bool IsInGame() const;
bool IsConnected() const;
bool IsAuthorized() const;
bool IsFakeClient() const;
const char *GetName();
const char *GetIPAddress();
const char *GetAuthString();
edict_t *GetEdict();
bool IsInGame();
bool IsConnected();
bool IsAuthorized();
bool IsFakeClient();
void SetAdminId(AdminId id, bool temporary);
AdminId GetAdminId() const;
AdminId GetAdminId();
private:
void Initialize(const char *name, const char *ip, edict_t *pEntity);
void Connect();

View File

@ -671,17 +671,17 @@ bool CForward::AddFunction(IPluginFunction *func)
return true;
}
const char *CForward::GetForwardName() const
const char *CForward::GetForwardName()
{
return m_name;
}
unsigned int CForward::GetFunctionCount() const
unsigned int CForward::GetFunctionCount()
{
return m_functions.size();
}
ExecType CForward::GetExecType() const
ExecType CForward::GetExecType()
{
return m_ExecType;
}

View File

@ -55,9 +55,9 @@ public: //ICallable
virtual int PushStringEx(char *buffer, size_t length, int sz_flags, int cp_flags);
virtual void Cancel();
public: //IForward
virtual const char *GetForwardName() const;
virtual unsigned int GetFunctionCount() const;
virtual ExecType GetExecType() const;
virtual const char *GetForwardName();
virtual unsigned int GetFunctionCount();
virtual ExecType GetExecType();
virtual int Execute(cell_t *result, IForwardFilter *filter);
public: //IChangeableForward
virtual bool RemoveFunction(IPluginFunction *func);

View File

@ -349,47 +349,47 @@ bool CPlugin::Call_AskPluginLoad(char *error, size_t maxlength)
return true;
}
const sp_plugin_t *CPlugin::GetPluginStructure() const
const sp_plugin_t *CPlugin::GetPluginStructure()
{
return m_plugin;
}
IPluginContext *CPlugin::GetBaseContext() const
IPluginContext *CPlugin::GetBaseContext()
{
return m_ctx.base;
}
sp_context_t *CPlugin::GetContext() const
sp_context_t *CPlugin::GetContext()
{
return m_ctx.ctx;
}
const char *CPlugin::GetFilename() const
const char *CPlugin::GetFilename()
{
return m_filename;
}
PluginType CPlugin::GetType() const
PluginType CPlugin::GetType()
{
return m_type;
}
const sm_plugininfo_t *CPlugin::GetPublicInfo() const
const sm_plugininfo_t *CPlugin::GetPublicInfo()
{
return &m_info;
}
unsigned int CPlugin::GetSerial() const
unsigned int CPlugin::GetSerial()
{
return m_serial;
}
PluginStatus CPlugin::GetStatus() const
PluginStatus CPlugin::GetStatus()
{
return m_status;
}
bool CPlugin::IsDebugging() const
bool CPlugin::IsDebugging()
{
if (!m_ctx.ctx)
{
@ -430,7 +430,7 @@ bool CPlugin::SetPauseState(bool paused)
return true;
}
IdentityToken_t *CPlugin::GetIdentity() const
IdentityToken_t *CPlugin::GetIdentity()
{
return m_ident;
}
@ -501,7 +501,7 @@ bool CPlugin::ToggleDebugMode(bool debug, char *error, size_t maxlength)
return true;
}
bool CPlugin::IsRunnable() const
bool CPlugin::IsRunnable()
{
return (m_status <= Plugin_Paused) ? true : false;
}
@ -524,7 +524,7 @@ time_t CPlugin::GetFileTimeStamp()
}
}
time_t CPlugin::GetTimeStamp() const
time_t CPlugin::GetTimeStamp()
{
return m_LastAccess;
}
@ -539,12 +539,12 @@ void CPlugin::AddLangFile(unsigned int index)
m_PhraseFiles.push_back(index);
}
size_t CPlugin::GetLangFileCount() const
size_t CPlugin::GetLangFileCount()
{
return m_PhraseFiles.size();
}
unsigned int CPlugin::GetLangFileByIndex(unsigned int index) const
unsigned int CPlugin::GetLangFileByIndex(unsigned int index)
{
return m_PhraseFiles.at(index);
}

View File

@ -116,17 +116,17 @@ public:
CPlugin(const char *file);
~CPlugin();
public:
virtual PluginType GetType() const;
virtual SourcePawn::IPluginContext *GetBaseContext() const;
virtual sp_context_t *GetContext() const;
virtual const sm_plugininfo_t *GetPublicInfo() const;
virtual const char *GetFilename() const;
virtual bool IsDebugging() const;
virtual PluginStatus GetStatus() const;
virtual PluginType GetType();
virtual SourcePawn::IPluginContext *GetBaseContext();
virtual sp_context_t *GetContext();
virtual const sm_plugininfo_t *GetPublicInfo();
virtual const char *GetFilename();
virtual bool IsDebugging();
virtual PluginStatus GetStatus();
virtual bool SetPauseState(bool paused);
virtual unsigned int GetSerial() const;
virtual const sp_plugin_t *GetPluginStructure() const;
virtual IdentityToken_t *GetIdentity() const;
virtual unsigned int GetSerial();
virtual const sp_plugin_t *GetPluginStructure();
virtual IdentityToken_t *GetIdentity();
virtual bool SetProperty(const char *prop, void *ptr);
virtual bool GetProperty(const char *prop, void **ptr, bool remove=false);
public:
@ -189,7 +189,7 @@ public:
/**
* Returns true if a plugin is usable.
*/
bool IsRunnable() const;
bool IsRunnable();
/**
* Adds a language file index to the plugin's list.
@ -199,17 +199,17 @@ public:
/**
* Get language file count for this plugin.
*/
size_t GetLangFileCount() const;
size_t GetLangFileCount();
/**
* Get language file index based on the vector index.
*/
unsigned int GetLangFileByIndex(unsigned int index) const;
unsigned int GetLangFileByIndex(unsigned int index);
public:
/**
* Returns the modification time during last plugin load.
*/
time_t GetTimeStamp() const;
time_t GetTimeStamp();
/**
* Returns the current modification time of the plugin file.

View File

@ -146,21 +146,21 @@ namespace SourceMod
*
* @return Forward name.
*/
virtual const char *GetForwardName() const =0;
virtual const char *GetForwardName() =0;
/**
* @brief Returns the number of functions in this forward.
*
* @return Number of functions in forward.
*/
virtual unsigned int GetFunctionCount() const =0;
virtual unsigned int GetFunctionCount() =0;
/**
* @brief Returns the method of multi-calling this forward has.
*
* @return ExecType of the forward.
*/
virtual ExecType GetExecType() const =0;
virtual ExecType GetExecType() =0;
/**
* @brief Executes the forward.

View File

@ -45,7 +45,7 @@ namespace SourceMod
* @return String containing the player's name,
* or NULL if unavailable.
*/
virtual const char *GetName() const =0;
virtual const char *GetName() =0;
/**
* @brief Returns the player's IP address.
@ -53,7 +53,7 @@ namespace SourceMod
* @return String containing the player's IP address,
* or NULL if unavailable.
*/
virtual const char *GetIPAddress() const =0;
virtual const char *GetIPAddress() =0;
/**
* @brief Returns the player's authentication string.
@ -61,21 +61,21 @@ namespace SourceMod
* @return String containing the player's auth string.
* May be NULL if unavailable.
*/
virtual const char *GetAuthString() const =0;
virtual const char *GetAuthString() =0;
/**
* @brief Returns the player's edict_t structure.
*
* @return edict_t pointer, or NULL if unavailable.
*/
virtual edict_t *GetEdict() const =0;
virtual edict_t *GetEdict() =0;
/**
* @brief Returns whether the player is in game (putinserver).
*
* @return True if in game, false otherwise.
*/
virtual bool IsInGame() const =0;
virtual bool IsInGame() =0;
/**
* @brief Returns whether the player is connected.
@ -85,21 +85,21 @@ namespace SourceMod
*
* @return True if connected, false otherwise.
*/
virtual bool IsConnected() const =0;
virtual bool IsConnected() =0;
/**
* @brief Returns whether the player is a fake client.
*
* @return True if a fake client, false otherwise.
*/
virtual bool IsFakeClient() const =0;
virtual bool IsFakeClient() =0;
/**
* @brief Returns the client's AdminId, if any.
*
* @return AdminId, or INVALID_ADMIN_ID if none.
*/
virtual AdminId GetAdminId() const =0;
virtual AdminId GetAdminId() =0;
/**
* @brief Sets the client's AdminId.

View File

@ -93,50 +93,50 @@ namespace SourceMod
/**
* @brief Returns the lifetime of a plugin.
*/
virtual PluginType GetType() const =0;
virtual PluginType GetType() =0;
/**
* @brief Returns the current API context being used in the plugin.
*
* @return Pointer to an IPluginContext, or NULL if not loaded.
*/
virtual SourcePawn::IPluginContext *GetBaseContext() const =0;
virtual SourcePawn::IPluginContext *GetBaseContext() =0;
/**
* @brief Returns the context structure being used in the plugin.
*
* @return Pointer to an sp_context_t, or NULL if not loaded.
*/
virtual sp_context_t *GetContext() const =0;
virtual sp_context_t *GetContext() =0;
/**
* @brief Returns the plugin file structure.
*
* @return Pointer to an sp_plugin_t, or NULL if not loaded.
*/
virtual const sp_plugin_t *GetPluginStructure() const =0;
virtual const sp_plugin_t *GetPluginStructure() =0;
/**
* @brief Returns information about the plugin by reference.
*
* @return Pointer to a sm_plugininfo_t object, NULL if plugin is not loaded.
*/
virtual const sm_plugininfo_t *GetPublicInfo() const =0;
virtual const sm_plugininfo_t *GetPublicInfo() =0;
/**
* @brief Returns the plugin filename (relative to plugins dir).
*/
virtual const char *GetFilename() const =0;
virtual const char *GetFilename() =0;
/**
* @brief Returns true if a plugin is in debug mode, false otherwise.
*/
virtual bool IsDebugging() const =0;
virtual bool IsDebugging() =0;
/**
* @brief Returns the plugin status.
*/
virtual PluginStatus GetStatus() const =0;
virtual PluginStatus GetStatus() =0;
/**
* @brief Sets whether the plugin is paused or not.
@ -148,12 +148,12 @@ namespace SourceMod
/**
* @brief Returns the unique serial number of a plugin.
*/
virtual unsigned int GetSerial() const =0;
virtual unsigned int GetSerial() =0;
/**
* @brief Returns a plugin's identity token.
*/
virtual IdentityToken_t *GetIdentity() const =0;
virtual IdentityToken_t *GetIdentity() =0;
/**
* @brief Sets a property on this plugin. This is used for per-plugin