removed const from most apis. it was pointless since there were no actual const pointers.
authorDavid Anderson <dvander@alliedmods.net>
Thu Mar 15 04:34:42 2007 +0000 (2007-03-15)
changeset 615c4aa259cca88
parent 614 0e233cc5a711
child 616 d5b1dcf38c07
removed const from most apis. it was pointless since there were no actual const pointers.
core/PlayerManager.cpp
core/PlayerManager.h
core/systems/ForwardSys.cpp
core/systems/ForwardSys.h
core/systems/PluginSys.cpp
core/systems/PluginSys.h
public/IForwardSys.h
public/IPlayerHelpers.h
public/IPluginSys.h
     1.1 --- a/core/PlayerManager.cpp	Thu Mar 15 04:23:46 2007 +0000
     1.2 +++ b/core/PlayerManager.cpp	Thu Mar 15 04:34:42 2007 +0000
     1.3 @@ -467,42 +467,42 @@
     1.4  	m_Name.assign(name);
     1.5  }
     1.6  
     1.7 -const char *CPlayer::GetName() const
     1.8 +const char *CPlayer::GetName()
     1.9  {
    1.10  	return m_Name.c_str();
    1.11  }
    1.12  
    1.13 -const char *CPlayer::GetIPAddress() const
    1.14 +const char *CPlayer::GetIPAddress()
    1.15  {
    1.16  	return m_Ip.c_str();
    1.17  }
    1.18  
    1.19 -const char *CPlayer::GetAuthString() const
    1.20 +const char *CPlayer::GetAuthString()
    1.21  {
    1.22  	return m_AuthID.c_str();
    1.23  }
    1.24  
    1.25 -edict_t *CPlayer::GetEdict() const
    1.26 +edict_t *CPlayer::GetEdict()
    1.27  {
    1.28  	return m_pEdict;
    1.29  }
    1.30  
    1.31 -bool CPlayer::IsInGame() const
    1.32 +bool CPlayer::IsInGame()
    1.33  {
    1.34  	return m_IsInGame;
    1.35  }
    1.36  
    1.37 -bool CPlayer::IsConnected() const
    1.38 +bool CPlayer::IsConnected()
    1.39  {
    1.40  	return m_IsConnected;
    1.41  }
    1.42  
    1.43 -bool CPlayer::IsAuthorized() const
    1.44 +bool CPlayer::IsAuthorized()
    1.45  {
    1.46  	return m_IsAuthorized;
    1.47  }
    1.48  
    1.49 -bool CPlayer::IsFakeClient() const
    1.50 +bool CPlayer::IsFakeClient()
    1.51  {
    1.52  	return (strcmp(m_AuthID.c_str(), "BOT") == 0);
    1.53  }
    1.54 @@ -520,7 +520,7 @@
    1.55  	m_TempAdmin = temporary;
    1.56  }
    1.57  
    1.58 -AdminId CPlayer::GetAdminId() const
    1.59 +AdminId CPlayer::GetAdminId()
    1.60  {
    1.61  	return m_Admin;
    1.62  }
     2.1 --- a/core/PlayerManager.h	Thu Mar 15 04:23:46 2007 +0000
     2.2 +++ b/core/PlayerManager.h	Thu Mar 15 04:34:42 2007 +0000
     2.3 @@ -32,16 +32,16 @@
     2.4  public:
     2.5  	CPlayer();
     2.6  public:
     2.7 -	const char *GetName() const;
     2.8 -	const char *GetIPAddress() const;
     2.9 -	const char *GetAuthString() const;
    2.10 -	edict_t *GetEdict() const;
    2.11 -	bool IsInGame() const;
    2.12 -	bool IsConnected() const;
    2.13 -	bool IsAuthorized() const;
    2.14 -	bool IsFakeClient() const;
    2.15 +	const char *GetName();
    2.16 +	const char *GetIPAddress();
    2.17 +	const char *GetAuthString();
    2.18 +	edict_t *GetEdict();
    2.19 +	bool IsInGame();
    2.20 +	bool IsConnected();
    2.21 +	bool IsAuthorized();
    2.22 +	bool IsFakeClient();
    2.23  	void SetAdminId(AdminId id, bool temporary);
    2.24 -	AdminId GetAdminId() const;
    2.25 +	AdminId GetAdminId();
    2.26  private:
    2.27  	void Initialize(const char *name, const char *ip, edict_t *pEntity);
    2.28  	void Connect();
     3.1 --- a/core/systems/ForwardSys.cpp	Thu Mar 15 04:23:46 2007 +0000
     3.2 +++ b/core/systems/ForwardSys.cpp	Thu Mar 15 04:34:42 2007 +0000
     3.3 @@ -671,17 +671,17 @@
     3.4  	return true;
     3.5  }
     3.6  
     3.7 -const char *CForward::GetForwardName() const
     3.8 +const char *CForward::GetForwardName()
     3.9  {
    3.10  	return m_name;
    3.11  }
    3.12  
    3.13 -unsigned int CForward::GetFunctionCount() const
    3.14 +unsigned int CForward::GetFunctionCount()
    3.15  {
    3.16  	return m_functions.size();
    3.17  }
    3.18  
    3.19 -ExecType CForward::GetExecType() const
    3.20 +ExecType CForward::GetExecType()
    3.21  {
    3.22  	return m_ExecType;
    3.23  }
     4.1 --- a/core/systems/ForwardSys.h	Thu Mar 15 04:23:46 2007 +0000
     4.2 +++ b/core/systems/ForwardSys.h	Thu Mar 15 04:34:42 2007 +0000
     4.3 @@ -55,9 +55,9 @@
     4.4  	virtual int PushStringEx(char *buffer, size_t length, int sz_flags, int cp_flags);
     4.5  	virtual void Cancel();
     4.6  public: //IForward
     4.7 -	virtual const char *GetForwardName() const;
     4.8 -	virtual unsigned int GetFunctionCount() const;
     4.9 -	virtual ExecType GetExecType() const;
    4.10 +	virtual const char *GetForwardName();
    4.11 +	virtual unsigned int GetFunctionCount();
    4.12 +	virtual ExecType GetExecType();
    4.13  	virtual int Execute(cell_t *result, IForwardFilter *filter);
    4.14  public: //IChangeableForward
    4.15  	virtual bool RemoveFunction(IPluginFunction *func);
     5.1 --- a/core/systems/PluginSys.cpp	Thu Mar 15 04:23:46 2007 +0000
     5.2 +++ b/core/systems/PluginSys.cpp	Thu Mar 15 04:34:42 2007 +0000
     5.3 @@ -349,47 +349,47 @@
     5.4  	return true;
     5.5  }
     5.6  
     5.7 -const sp_plugin_t *CPlugin::GetPluginStructure() const
     5.8 +const sp_plugin_t *CPlugin::GetPluginStructure()
     5.9  {
    5.10  	return m_plugin;
    5.11  }
    5.12  
    5.13 -IPluginContext *CPlugin::GetBaseContext() const
    5.14 +IPluginContext *CPlugin::GetBaseContext()
    5.15  {
    5.16  	return m_ctx.base;
    5.17  }
    5.18  
    5.19 -sp_context_t *CPlugin::GetContext() const
    5.20 +sp_context_t *CPlugin::GetContext()
    5.21  {
    5.22  	return m_ctx.ctx;
    5.23  }
    5.24  
    5.25 -const char *CPlugin::GetFilename() const
    5.26 +const char *CPlugin::GetFilename()
    5.27  {
    5.28  	return m_filename;
    5.29  }
    5.30  
    5.31 -PluginType CPlugin::GetType() const
    5.32 +PluginType CPlugin::GetType()
    5.33  {
    5.34  	return m_type;
    5.35  }
    5.36  
    5.37 -const sm_plugininfo_t *CPlugin::GetPublicInfo() const
    5.38 +const sm_plugininfo_t *CPlugin::GetPublicInfo()
    5.39  {
    5.40  	return &m_info;
    5.41  }
    5.42  
    5.43 -unsigned int CPlugin::GetSerial() const
    5.44 +unsigned int CPlugin::GetSerial()
    5.45  {
    5.46  	return m_serial;
    5.47  }
    5.48  
    5.49 -PluginStatus CPlugin::GetStatus() const
    5.50 +PluginStatus CPlugin::GetStatus()
    5.51  {
    5.52  	return m_status;
    5.53  }
    5.54  
    5.55 -bool CPlugin::IsDebugging() const
    5.56 +bool CPlugin::IsDebugging()
    5.57  {
    5.58  	if (!m_ctx.ctx)
    5.59  	{
    5.60 @@ -430,7 +430,7 @@
    5.61  	return true;
    5.62  }
    5.63  
    5.64 -IdentityToken_t *CPlugin::GetIdentity() const
    5.65 +IdentityToken_t *CPlugin::GetIdentity()
    5.66  {
    5.67  	return m_ident;
    5.68  }
    5.69 @@ -501,7 +501,7 @@
    5.70  	return true;
    5.71  }
    5.72  
    5.73 -bool CPlugin::IsRunnable() const
    5.74 +bool CPlugin::IsRunnable()
    5.75  {
    5.76  	return (m_status <= Plugin_Paused) ? true : false;
    5.77  }
    5.78 @@ -524,7 +524,7 @@
    5.79  	}
    5.80  }
    5.81  
    5.82 -time_t CPlugin::GetTimeStamp() const
    5.83 +time_t CPlugin::GetTimeStamp()
    5.84  {
    5.85  	return m_LastAccess;
    5.86  }
    5.87 @@ -539,12 +539,12 @@
    5.88  	m_PhraseFiles.push_back(index);
    5.89  }
    5.90  
    5.91 -size_t CPlugin::GetLangFileCount() const
    5.92 +size_t CPlugin::GetLangFileCount()
    5.93  {
    5.94  	return m_PhraseFiles.size();
    5.95  }
    5.96  
    5.97 -unsigned int CPlugin::GetLangFileByIndex(unsigned int index) const
    5.98 +unsigned int CPlugin::GetLangFileByIndex(unsigned int index)
    5.99  {
   5.100  	return m_PhraseFiles.at(index);
   5.101  }
     6.1 --- a/core/systems/PluginSys.h	Thu Mar 15 04:23:46 2007 +0000
     6.2 +++ b/core/systems/PluginSys.h	Thu Mar 15 04:34:42 2007 +0000
     6.3 @@ -116,17 +116,17 @@
     6.4  	CPlugin(const char *file);
     6.5  	~CPlugin();
     6.6  public:
     6.7 -	virtual PluginType GetType() const;
     6.8 -	virtual SourcePawn::IPluginContext *GetBaseContext() const;
     6.9 -	virtual sp_context_t *GetContext() const;
    6.10 -	virtual const sm_plugininfo_t *GetPublicInfo() const;
    6.11 -	virtual const char *GetFilename() const;
    6.12 -	virtual bool IsDebugging() const;
    6.13 -	virtual PluginStatus GetStatus() const;
    6.14 +	virtual PluginType GetType();
    6.15 +	virtual SourcePawn::IPluginContext *GetBaseContext();
    6.16 +	virtual sp_context_t *GetContext();
    6.17 +	virtual const sm_plugininfo_t *GetPublicInfo();
    6.18 +	virtual const char *GetFilename();
    6.19 +	virtual bool IsDebugging();
    6.20 +	virtual PluginStatus GetStatus();
    6.21  	virtual bool SetPauseState(bool paused);
    6.22 -	virtual unsigned int GetSerial() const;
    6.23 -	virtual const sp_plugin_t *GetPluginStructure() const;
    6.24 -	virtual IdentityToken_t *GetIdentity() const;
    6.25 +	virtual unsigned int GetSerial();
    6.26 +	virtual const sp_plugin_t *GetPluginStructure();
    6.27 +	virtual IdentityToken_t *GetIdentity();
    6.28  	virtual bool SetProperty(const char *prop, void *ptr);
    6.29  	virtual bool GetProperty(const char *prop, void **ptr, bool remove=false);
    6.30  public:
    6.31 @@ -189,7 +189,7 @@
    6.32  	/**
    6.33  	 * Returns true if a plugin is usable.
    6.34  	 */
    6.35 -	bool IsRunnable() const;
    6.36 +	bool IsRunnable();
    6.37  
    6.38  	/**
    6.39  	 * Adds a language file index to the plugin's list.
    6.40 @@ -199,17 +199,17 @@
    6.41  	/**
    6.42  	 * Get language file count for this plugin.
    6.43  	 */
    6.44 -	size_t GetLangFileCount() const;
    6.45 +	size_t GetLangFileCount();
    6.46  
    6.47  	/**
    6.48  	 * Get language file index based on the vector index.
    6.49  	 */
    6.50 -	unsigned int GetLangFileByIndex(unsigned int index) const;
    6.51 +	unsigned int GetLangFileByIndex(unsigned int index);
    6.52  public:
    6.53  	/**
    6.54  	 * Returns the modification time during last plugin load.
    6.55  	 */
    6.56 -	time_t GetTimeStamp() const;
    6.57 +	time_t GetTimeStamp();
    6.58  
    6.59  	/**
    6.60  	 * Returns the current modification time of the plugin file.
     7.1 --- a/public/IForwardSys.h	Thu Mar 15 04:23:46 2007 +0000
     7.2 +++ b/public/IForwardSys.h	Thu Mar 15 04:34:42 2007 +0000
     7.3 @@ -146,21 +146,21 @@
     7.4  		 *
     7.5  		 * @return			Forward name.
     7.6  		 */
     7.7 -		virtual const char *GetForwardName() const =0;
     7.8 +		virtual const char *GetForwardName() =0;
     7.9  
    7.10  		/**
    7.11  		 * @brief Returns the number of functions in this forward.
    7.12  		 *
    7.13  		 * @return			Number of functions in forward.
    7.14  		 */
    7.15 -		virtual unsigned int GetFunctionCount() const =0;
    7.16 +		virtual unsigned int GetFunctionCount() =0;
    7.17  
    7.18  		/**
    7.19  		 * @brief Returns the method of multi-calling this forward has.
    7.20  		 *
    7.21  		 * @return			ExecType of the forward.
    7.22  		 */
    7.23 -		virtual ExecType GetExecType() const =0;
    7.24 +		virtual ExecType GetExecType() =0;
    7.25  
    7.26  		/**
    7.27  		 * @brief Executes the forward.
     8.1 --- a/public/IPlayerHelpers.h	Thu Mar 15 04:23:46 2007 +0000
     8.2 +++ b/public/IPlayerHelpers.h	Thu Mar 15 04:34:42 2007 +0000
     8.3 @@ -45,7 +45,7 @@
     8.4  		 * @return		String containing the player's name,
     8.5  		 *				or NULL if unavailable.
     8.6  		 */
     8.7 -		virtual const char *GetName() const =0;
     8.8 +		virtual const char *GetName() =0;
     8.9  
    8.10  		/**
    8.11  		 * @brief Returns the player's IP address.
    8.12 @@ -53,7 +53,7 @@
    8.13  		 * @return		String containing the player's IP address,
    8.14  		 *				or NULL if unavailable.
    8.15  		 */
    8.16 -		virtual const char *GetIPAddress() const =0;
    8.17 +		virtual const char *GetIPAddress() =0;
    8.18  
    8.19  		/**
    8.20  		 * @brief Returns the player's authentication string.
    8.21 @@ -61,21 +61,21 @@
    8.22  		 * @return		String containing the player's auth string.
    8.23  		 *				May be NULL if unavailable.
    8.24  		 */
    8.25 -		virtual const char *GetAuthString() const =0;
    8.26 +		virtual const char *GetAuthString() =0;
    8.27  
    8.28  		/**
    8.29  		 * @brief Returns the player's edict_t structure.
    8.30  		 *
    8.31  		 * @return		edict_t pointer, or NULL if unavailable.
    8.32  		 */
    8.33 -		virtual edict_t *GetEdict() const =0;
    8.34 +		virtual edict_t *GetEdict() =0;
    8.35  
    8.36  		/**
    8.37  		 * @brief Returns whether the player is in game (putinserver).
    8.38  		 *
    8.39  		 * @return		True if in game, false otherwise.
    8.40  		 */
    8.41 -		virtual bool IsInGame() const =0;
    8.42 +		virtual bool IsInGame() =0;
    8.43  
    8.44  		/**
    8.45  		 * @brief Returns whether the player is connected.
    8.46 @@ -85,21 +85,21 @@
    8.47  		 *
    8.48  		 * @return		True if connected, false otherwise.
    8.49  		 */
    8.50 -		virtual bool IsConnected() const =0;
    8.51 +		virtual bool IsConnected() =0;
    8.52  
    8.53  		/**
    8.54  		 * @brief Returns whether the player is a fake client.
    8.55  		 *
    8.56  		 * @return		True if a fake client, false otherwise.
    8.57  		 */
    8.58 -		virtual bool IsFakeClient() const =0;
    8.59 +		virtual bool IsFakeClient() =0;
    8.60  
    8.61  		/**
    8.62  		 * @brief Returns the client's AdminId, if any.
    8.63  		 *
    8.64  		 * @return		AdminId, or INVALID_ADMIN_ID if none.
    8.65  		 */
    8.66 -		virtual AdminId GetAdminId() const =0;
    8.67 +		virtual AdminId GetAdminId() =0;
    8.68  
    8.69  		/**
    8.70  		 * @brief Sets the client's AdminId.
     9.1 --- a/public/IPluginSys.h	Thu Mar 15 04:23:46 2007 +0000
     9.2 +++ b/public/IPluginSys.h	Thu Mar 15 04:34:42 2007 +0000
     9.3 @@ -93,50 +93,50 @@
     9.4  		/**
     9.5  		 * @brief Returns the lifetime of a plugin.
     9.6  		 */
     9.7 -		virtual PluginType GetType() const =0;
     9.8 +		virtual PluginType GetType() =0;
     9.9  
    9.10  		/**
    9.11  		 * @brief Returns the current API context being used in the plugin.
    9.12  		 *
    9.13  		 * @return	Pointer to an IPluginContext, or NULL if not loaded.
    9.14  		 */
    9.15 -		virtual SourcePawn::IPluginContext *GetBaseContext() const =0;
    9.16 +		virtual SourcePawn::IPluginContext *GetBaseContext() =0;
    9.17  
    9.18  		/**
    9.19  		 * @brief Returns the context structure being used in the plugin.
    9.20  		 *
    9.21  		 * @return	Pointer to an sp_context_t, or NULL if not loaded.
    9.22  		 */
    9.23 -		virtual sp_context_t *GetContext() const =0;
    9.24 +		virtual sp_context_t *GetContext() =0;
    9.25  
    9.26  		/**
    9.27  		 * @brief Returns the plugin file structure.
    9.28  		 *
    9.29  		 * @return	Pointer to an sp_plugin_t, or NULL if not loaded.
    9.30  		 */
    9.31 -		virtual const sp_plugin_t *GetPluginStructure() const =0;
    9.32 +		virtual const sp_plugin_t *GetPluginStructure() =0;
    9.33  
    9.34  		/**
    9.35  		 * @brief Returns information about the plugin by reference.
    9.36  		 *
    9.37  		 * @return			Pointer to a sm_plugininfo_t object, NULL if plugin is not loaded.
    9.38  		 */
    9.39 -		virtual const sm_plugininfo_t *GetPublicInfo() const =0;
    9.40 +		virtual const sm_plugininfo_t *GetPublicInfo() =0;
    9.41  
    9.42  		/**
    9.43  		 * @brief Returns the plugin filename (relative to plugins dir).
    9.44  		 */
    9.45 -		virtual const char *GetFilename() const =0;
    9.46 +		virtual const char *GetFilename() =0;
    9.47  
    9.48  		/**
    9.49  		 * @brief Returns true if a plugin is in debug mode, false otherwise.
    9.50  		 */
    9.51 -		virtual bool IsDebugging() const =0;
    9.52 +		virtual bool IsDebugging() =0;
    9.53  
    9.54  		/**
    9.55  		 * @brief Returns the plugin status.
    9.56  		 */
    9.57 -		virtual PluginStatus GetStatus() const =0;
    9.58 +		virtual PluginStatus GetStatus() =0;
    9.59  		
    9.60  		/**
    9.61  		 * @brief Sets whether the plugin is paused or not.
    9.62 @@ -148,12 +148,12 @@
    9.63  		/**
    9.64  		 * @brief Returns the unique serial number of a plugin.
    9.65  		 */
    9.66 -		virtual unsigned int GetSerial() const =0;
    9.67 +		virtual unsigned int GetSerial() =0;
    9.68  
    9.69  		/**
    9.70  		 * @brief Returns a plugin's identity token.
    9.71  		 */
    9.72 -		virtual IdentityToken_t *GetIdentity() const =0;
    9.73 +		virtual IdentityToken_t *GetIdentity() =0;
    9.74  
    9.75  		/**
    9.76  		 * @brief Sets a property on this plugin.  This is used for per-plugin