mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-16 07:07:13 +02:00
Discard instances of constant StackStrF parameters. This should always be non-const if possible.
This commit is contained in:
@ -52,7 +52,7 @@ const String & CBlip::GetTag() const
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CBlip::SetTag(const StackStrF & tag)
|
||||
void CBlip::SetTag(StackStrF & tag)
|
||||
{
|
||||
if (tag.mLen > 0)
|
||||
{
|
||||
@ -65,7 +65,7 @@ void CBlip::SetTag(const StackStrF & tag)
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
CBlip & CBlip::ApplyTag(const StackStrF & tag)
|
||||
CBlip & CBlip::ApplyTag(StackStrF & tag)
|
||||
{
|
||||
SetTag(tag);
|
||||
return *this;
|
||||
|
@ -119,12 +119,12 @@ public:
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the associated user tag.
|
||||
*/
|
||||
void SetTag(const StackStrF & tag);
|
||||
void SetTag(StackStrF & tag);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the associated user tag.
|
||||
*/
|
||||
CBlip & ApplyTag(const StackStrF & tag);
|
||||
CBlip & ApplyTag(StackStrF & tag);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve the associated user data.
|
||||
|
@ -55,7 +55,7 @@ const String & CCheckpoint::GetTag() const
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CCheckpoint::SetTag(const StackStrF & tag)
|
||||
void CCheckpoint::SetTag(StackStrF & tag)
|
||||
{
|
||||
if (tag.mLen > 0)
|
||||
{
|
||||
@ -68,7 +68,7 @@ void CCheckpoint::SetTag(const StackStrF & tag)
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
CCheckpoint & CCheckpoint::ApplyTag(const StackStrF & tag)
|
||||
CCheckpoint & CCheckpoint::ApplyTag(StackStrF & tag)
|
||||
{
|
||||
SetTag(tag);
|
||||
return *this;
|
||||
|
@ -133,12 +133,12 @@ public:
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the associated user tag.
|
||||
*/
|
||||
void SetTag(const StackStrF & tag);
|
||||
void SetTag(StackStrF & tag);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the associated user tag.
|
||||
*/
|
||||
CCheckpoint & ApplyTag(const StackStrF & tag);
|
||||
CCheckpoint & ApplyTag(StackStrF & tag);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve the associated user data.
|
||||
|
@ -52,7 +52,7 @@ const String & CKeybind::GetTag() const
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CKeybind::SetTag(const StackStrF & tag)
|
||||
void CKeybind::SetTag(StackStrF & tag)
|
||||
{
|
||||
if (tag.mLen > 0)
|
||||
{
|
||||
@ -65,7 +65,7 @@ void CKeybind::SetTag(const StackStrF & tag)
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
CKeybind & CKeybind::ApplyTag(const StackStrF & tag)
|
||||
CKeybind & CKeybind::ApplyTag(StackStrF & tag)
|
||||
{
|
||||
SetTag(tag);
|
||||
return *this;
|
||||
|
@ -119,12 +119,12 @@ public:
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the associated user tag.
|
||||
*/
|
||||
void SetTag(const StackStrF & tag);
|
||||
void SetTag(StackStrF & tag);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the associated user tag.
|
||||
*/
|
||||
CKeybind & ApplyTag(const StackStrF & tag);
|
||||
CKeybind & ApplyTag(StackStrF & tag);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve the associated user data.
|
||||
|
@ -61,7 +61,7 @@ const String & CObject::GetTag() const
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CObject::SetTag(const StackStrF & tag)
|
||||
void CObject::SetTag(StackStrF & tag)
|
||||
{
|
||||
if (tag.mLen > 0)
|
||||
{
|
||||
@ -74,7 +74,7 @@ void CObject::SetTag(const StackStrF & tag)
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
CObject & CObject::ApplyTag(const StackStrF & tag)
|
||||
CObject & CObject::ApplyTag(StackStrF & tag)
|
||||
{
|
||||
SetTag(tag);
|
||||
return *this;
|
||||
|
@ -152,12 +152,12 @@ public:
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the associated user tag.
|
||||
*/
|
||||
void SetTag(const StackStrF & tag);
|
||||
void SetTag(StackStrF & tag);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the associated user tag.
|
||||
*/
|
||||
CObject & ApplyTag(const StackStrF & tag);
|
||||
CObject & ApplyTag(StackStrF & tag);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve the associated user data.
|
||||
|
@ -54,7 +54,7 @@ const String & CPickup::GetTag() const
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CPickup::SetTag(const StackStrF & tag)
|
||||
void CPickup::SetTag(StackStrF & tag)
|
||||
{
|
||||
if (tag.mLen > 0)
|
||||
{
|
||||
@ -67,7 +67,7 @@ void CPickup::SetTag(const StackStrF & tag)
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
CPickup & CPickup::ApplyTag(const StackStrF & tag)
|
||||
CPickup & CPickup::ApplyTag(StackStrF & tag)
|
||||
{
|
||||
SetTag(tag);
|
||||
return *this;
|
||||
|
@ -136,12 +136,12 @@ public:
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the associated user tag.
|
||||
*/
|
||||
void SetTag(const StackStrF & tag);
|
||||
void SetTag(StackStrF & tag);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the associated user tag.
|
||||
*/
|
||||
CPickup & ApplyTag(const StackStrF & tag);
|
||||
CPickup & ApplyTag(StackStrF & tag);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve the associated user data.
|
||||
|
@ -84,7 +84,7 @@ const String & CPlayer::GetTag() const
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CPlayer::SetTag(const StackStrF & tag)
|
||||
void CPlayer::SetTag(StackStrF & tag)
|
||||
{
|
||||
if (tag.mLen > 0)
|
||||
{
|
||||
@ -97,7 +97,7 @@ void CPlayer::SetTag(const StackStrF & tag)
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
CPlayer & CPlayer::ApplyTag(const StackStrF & tag)
|
||||
CPlayer & CPlayer::ApplyTag(StackStrF & tag)
|
||||
{
|
||||
SetTag(tag);
|
||||
return *this;
|
||||
@ -314,7 +314,7 @@ CSStr CPlayer::GetName() const
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CPlayer::SetName(const StackStrF & name) const
|
||||
void CPlayer::SetName(StackStrF & name) const
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
@ -1378,8 +1378,8 @@ void CPlayer::Unspectate() const
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CPlayer::Redirect(const StackStrF & ip, Uint32 port, const StackStrF & nick,
|
||||
const StackStrF & server_pass, const StackStrF & user_pass)
|
||||
void CPlayer::Redirect(StackStrF & ip, Uint32 port, StackStrF & nick,
|
||||
StackStrF & server_pass, StackStrF & user_pass)
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
@ -1565,7 +1565,7 @@ const String & CPlayer::GetMessagePrefix(Uint32 index) const
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CPlayer::SetMessagePrefix(Uint32 index, const StackStrF & prefix)
|
||||
void CPlayer::SetMessagePrefix(Uint32 index, StackStrF & prefix)
|
||||
{
|
||||
// Perform a range check on the specified prefix index
|
||||
if (index >= SQMOD_PLAYER_MSG_PREFIXES)
|
||||
@ -1742,7 +1742,7 @@ void CPlayer::StreamFloat(SQFloat val)
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CPlayer::StreamString(const StackStrF & val)
|
||||
void CPlayer::StreamString(StackStrF & val)
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
@ -1756,7 +1756,7 @@ void CPlayer::StreamString(const StackStrF & val)
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CPlayer::StreamRawString(const StackStrF & val)
|
||||
void CPlayer::StreamRawString(StackStrF & val)
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
|
@ -203,12 +203,12 @@ public:
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the associated user tag.
|
||||
*/
|
||||
void SetTag(const StackStrF & tag);
|
||||
void SetTag(StackStrF & tag);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the associated user tag.
|
||||
*/
|
||||
CPlayer & ApplyTag(const StackStrF & tag);
|
||||
CPlayer & ApplyTag(StackStrF & tag);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve the associated user data.
|
||||
@ -298,7 +298,7 @@ public:
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the nick name of the managed player entity.
|
||||
*/
|
||||
void SetName(const StackStrF & name) const;
|
||||
void SetName(StackStrF & name) const;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve the current state of the managed player entity.
|
||||
@ -743,8 +743,8 @@ public:
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Redirect the managed player entity to the specified server.
|
||||
*/
|
||||
void Redirect(const StackStrF & ip, Uint32 port, const StackStrF & nick,
|
||||
const StackStrF & server_pass, const StackStrF & user_pass);
|
||||
void Redirect(StackStrF & ip, Uint32 port, StackStrF & nick,
|
||||
StackStrF & server_pass, StackStrF & user_pass);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Request a list of the modules loaded into the client session.
|
||||
@ -814,7 +814,7 @@ public:
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the message prefix at the specified index for the managed player entity.
|
||||
*/
|
||||
void SetMessagePrefix(Uint32 index, const StackStrF & prefix);
|
||||
void SetMessagePrefix(Uint32 index, StackStrF & prefix);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve the amount of tracked position changes for the managed player entity.
|
||||
@ -909,12 +909,12 @@ public:
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Write a string to the stream buffer.
|
||||
*/
|
||||
void StreamString(const StackStrF & val);
|
||||
void StreamString(StackStrF & val);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Write a raw string to the stream buffer.
|
||||
*/
|
||||
void StreamRawString(const StackStrF & val);
|
||||
void StreamRawString(StackStrF & val);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Send the data in the stream buffer to the client.
|
||||
|
@ -57,7 +57,7 @@ const String & CVehicle::GetTag() const
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CVehicle::SetTag(const StackStrF & tag)
|
||||
void CVehicle::SetTag(StackStrF & tag)
|
||||
{
|
||||
if (tag.mLen > 0)
|
||||
{
|
||||
@ -70,7 +70,7 @@ void CVehicle::SetTag(const StackStrF & tag)
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
CVehicle & CVehicle::ApplyTag(const StackStrF & tag)
|
||||
CVehicle & CVehicle::ApplyTag(StackStrF & tag)
|
||||
{
|
||||
SetTag(tag);
|
||||
return *this;
|
||||
|
@ -139,12 +139,12 @@ public:
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the associated user tag.
|
||||
*/
|
||||
void SetTag(const StackStrF & tag);
|
||||
void SetTag(StackStrF & tag);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the associated user tag.
|
||||
*/
|
||||
CVehicle & ApplyTag(const StackStrF & tag);
|
||||
CVehicle & ApplyTag(StackStrF & tag);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve the associated user data.
|
||||
|
Reference in New Issue
Block a user