mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-29 21:47:12 +02:00
Discarded the noexcept specifier entirely.
This commit is contained in:
@ -10,25 +10,25 @@ namespace SqMod {
|
||||
const CWeapon CWeapon::NIL = CWeapon();
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
CWeapon::CWeapon() noexcept
|
||||
CWeapon::CWeapon()
|
||||
: m_ID(SQMOD_UNKNOWN), m_Ammo(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CWeapon::CWeapon(SQInt32 id) noexcept
|
||||
CWeapon::CWeapon(SQInt32 id)
|
||||
: CWeapon(id, 0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CWeapon::CWeapon(SQInt32 id, SQInt32 ammo) noexcept
|
||||
CWeapon::CWeapon(SQInt32 id, SQInt32 ammo)
|
||||
: m_ID(VALID_ENTITYGETEX(id, Max)), m_Ammo(ammo)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CWeapon::CWeapon(const SQChar * name, SQInt32 id, SQInt32 ammo) noexcept
|
||||
CWeapon::CWeapon(const SQChar * name, SQInt32 id, SQInt32 ammo)
|
||||
: m_ID(GetWeaponID(name)), m_Ammo(ammo)
|
||||
{
|
||||
if (VALID_ENTITYEX(m_ID, Max))
|
||||
@ -38,7 +38,7 @@ CWeapon::CWeapon(const SQChar * name, SQInt32 id, SQInt32 ammo) noexcept
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
CWeapon::CWeapon(const CWeapon & w) noexcept
|
||||
CWeapon::CWeapon(const CWeapon & w)
|
||||
: m_ID(w.m_ID)
|
||||
, m_Ammo(w.m_Ammo)
|
||||
, m_Tag(w.m_Tag)
|
||||
@ -47,7 +47,7 @@ CWeapon::CWeapon(const CWeapon & w) noexcept
|
||||
|
||||
}
|
||||
|
||||
CWeapon::CWeapon(CWeapon && w) noexcept
|
||||
CWeapon::CWeapon(CWeapon && w)
|
||||
: m_ID(w.m_ID)
|
||||
, m_Ammo(w.m_Ammo)
|
||||
, m_Tag(w.m_Tag)
|
||||
@ -63,7 +63,7 @@ CWeapon::~CWeapon()
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
CWeapon & CWeapon::operator = (const CWeapon & w) noexcept
|
||||
CWeapon & CWeapon::operator = (const CWeapon & w)
|
||||
{
|
||||
m_ID = w.m_ID;
|
||||
m_Ammo = w.m_Ammo;
|
||||
@ -73,7 +73,7 @@ CWeapon & CWeapon::operator = (const CWeapon & w) noexcept
|
||||
return *this;
|
||||
}
|
||||
|
||||
CWeapon & CWeapon::operator = (CWeapon && w) noexcept
|
||||
CWeapon & CWeapon::operator = (CWeapon && w)
|
||||
{
|
||||
m_ID = w.m_ID;
|
||||
m_Ammo = w.m_Ammo;
|
||||
@ -84,7 +84,7 @@ CWeapon & CWeapon::operator = (CWeapon && w) noexcept
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
CWeapon & CWeapon::operator = (SQInt32 id) noexcept
|
||||
CWeapon & CWeapon::operator = (SQInt32 id)
|
||||
{
|
||||
m_ID = VALID_ENTITYGETEX(id, Max);
|
||||
|
||||
@ -92,38 +92,38 @@ CWeapon & CWeapon::operator = (SQInt32 id) noexcept
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bool CWeapon::operator == (const CWeapon & w) const noexcept
|
||||
bool CWeapon::operator == (const CWeapon & w) const
|
||||
{
|
||||
return (m_ID == w.m_ID);
|
||||
}
|
||||
|
||||
bool CWeapon::operator != (const CWeapon & w) const noexcept
|
||||
bool CWeapon::operator != (const CWeapon & w) const
|
||||
{
|
||||
return (m_ID != w.m_ID);
|
||||
}
|
||||
|
||||
bool CWeapon::operator < (const CWeapon & w) const noexcept
|
||||
bool CWeapon::operator < (const CWeapon & w) const
|
||||
{
|
||||
return (m_ID < w.m_ID);
|
||||
}
|
||||
|
||||
bool CWeapon::operator > (const CWeapon & w) const noexcept
|
||||
bool CWeapon::operator > (const CWeapon & w) const
|
||||
{
|
||||
return (m_ID < w.m_ID);
|
||||
}
|
||||
|
||||
bool CWeapon::operator <= (const CWeapon & w) const noexcept
|
||||
bool CWeapon::operator <= (const CWeapon & w) const
|
||||
{
|
||||
return (m_ID <= w.m_ID);
|
||||
}
|
||||
|
||||
bool CWeapon::operator >= (const CWeapon & w) const noexcept
|
||||
bool CWeapon::operator >= (const CWeapon & w) const
|
||||
{
|
||||
return (m_ID >= w.m_ID);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
SQInteger CWeapon::Cmp(const CWeapon & w) const noexcept
|
||||
SQInteger CWeapon::Cmp(const CWeapon & w) const
|
||||
{
|
||||
if (m_ID == w.m_ID)
|
||||
{
|
||||
@ -140,24 +140,24 @@ SQInteger CWeapon::Cmp(const CWeapon & w) const noexcept
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
const SQChar * CWeapon::ToString() const noexcept
|
||||
const SQChar * CWeapon::ToString() const
|
||||
{
|
||||
return GetWeaponName(m_ID);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
SQInteger CWeapon::GetID() const noexcept
|
||||
SQInteger CWeapon::GetID() const
|
||||
{
|
||||
return m_ID;
|
||||
}
|
||||
|
||||
void CWeapon::SetID(SQInt32 id) noexcept
|
||||
void CWeapon::SetID(SQInt32 id)
|
||||
{
|
||||
m_ID = VALID_ENTITYGETEX(id, Max);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
CWeapon & CWeapon::SetnGet(SQInt32 id) noexcept
|
||||
CWeapon & CWeapon::SetnGet(SQInt32 id)
|
||||
{
|
||||
m_ID = VALID_ENTITYGETEX(id, Max);
|
||||
|
||||
@ -165,115 +165,115 @@ CWeapon & CWeapon::SetnGet(SQInt32 id) noexcept
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
const SQChar * CWeapon::GetGlobalTag() const noexcept
|
||||
const SQChar * CWeapon::GetGlobalTag() const
|
||||
{
|
||||
return GlobalTag(m_ID);
|
||||
}
|
||||
|
||||
void CWeapon::SetGlobalTag(const SQChar * tag) const noexcept
|
||||
void CWeapon::SetGlobalTag(const SQChar * tag) const
|
||||
{
|
||||
GlobalTag(m_ID, tag);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
SqObj & CWeapon::GetGlobalData() const noexcept
|
||||
SqObj & CWeapon::GetGlobalData() const
|
||||
{
|
||||
return GlobalData(m_ID);
|
||||
}
|
||||
|
||||
void CWeapon::SetGlobalData(SqObj & data) const noexcept
|
||||
void CWeapon::SetGlobalData(SqObj & data) const
|
||||
{
|
||||
GlobalData(m_ID, data);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
const SQChar * CWeapon::GetLocalTag() const noexcept
|
||||
const SQChar * CWeapon::GetLocalTag() const
|
||||
{
|
||||
return m_Tag.c_str();
|
||||
}
|
||||
|
||||
void CWeapon::SetLocalTag(const SQChar * tag) noexcept
|
||||
void CWeapon::SetLocalTag(const SQChar * tag)
|
||||
{
|
||||
m_Tag = tag;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
SqObj & CWeapon::GetLocalData() noexcept
|
||||
SqObj & CWeapon::GetLocalData()
|
||||
{
|
||||
return m_Data;
|
||||
}
|
||||
|
||||
void CWeapon::SetLocalData(SqObj & data) noexcept
|
||||
void CWeapon::SetLocalData(SqObj & data)
|
||||
{
|
||||
m_Data = data;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bool CWeapon::IsValid() const noexcept
|
||||
bool CWeapon::IsValid() const
|
||||
{
|
||||
return (VALID_ENTITYEX(m_ID, Max));
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
const SQChar * CWeapon::GetName() const noexcept
|
||||
const SQChar * CWeapon::GetName() const
|
||||
{
|
||||
return GetWeaponName(m_ID);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CWeapon::SetName(const SQChar * name) noexcept
|
||||
void CWeapon::SetName(const SQChar * name)
|
||||
{
|
||||
m_ID = GetWeaponID(name);
|
||||
m_ID = VALID_ENTITYGETEX(m_ID, Max);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
SQInteger CWeapon::GetAmmo() const noexcept
|
||||
SQInteger CWeapon::GetAmmo() const
|
||||
{
|
||||
return m_Ammo;
|
||||
}
|
||||
|
||||
void CWeapon::SetAmmo(SQInt32 amount) noexcept
|
||||
void CWeapon::SetAmmo(SQInt32 amount)
|
||||
{
|
||||
m_Ammo = amount;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bool CWeapon::IsNatural() const noexcept
|
||||
bool CWeapon::IsNatural() const
|
||||
{
|
||||
return IsWeaponNatural(m_ID);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
SQFloat CWeapon::GetDataValue(SQInt32 field) const noexcept
|
||||
SQFloat CWeapon::GetDataValue(SQInt32 field) const
|
||||
{
|
||||
return _Func->GetWeaponDataValue(m_ID, field);
|
||||
}
|
||||
|
||||
void CWeapon::SetDataValue(SQInt32 field, SQFloat value) const noexcept
|
||||
void CWeapon::SetDataValue(SQInt32 field, SQFloat value) const
|
||||
{
|
||||
_Func->SetWeaponDataValue(m_ID, field, value);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CWeapon::ResetData() const noexcept
|
||||
void CWeapon::ResetData() const
|
||||
{
|
||||
_Func->ResetWeaponData(m_ID);
|
||||
}
|
||||
|
||||
void CWeapon::ResetData(SQInt32 field) const noexcept
|
||||
void CWeapon::ResetData(SQInt32 field) const
|
||||
{
|
||||
_Func->ResetWeaponDataValue(m_ID, field);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bool CWeapon::IsDataModified(SQInt32 field) const noexcept
|
||||
bool CWeapon::IsDataModified(SQInt32 field) const
|
||||
{
|
||||
return _Func->IsWeaponDataValueModified(m_ID, field);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CWeapon::SetOn(const Reference< CPlayer > & player) const noexcept
|
||||
void CWeapon::SetOn(const Reference< CPlayer > & player) const
|
||||
{
|
||||
if (*this && player)
|
||||
{
|
||||
@ -289,7 +289,7 @@ void CWeapon::SetOn(const Reference< CPlayer > & player) const noexcept
|
||||
}
|
||||
}
|
||||
|
||||
void CWeapon::GiveTo(const Reference< CPlayer > & player) const noexcept
|
||||
void CWeapon::GiveTo(const Reference< CPlayer > & player) const
|
||||
{
|
||||
if (*this && player)
|
||||
{
|
||||
@ -305,7 +305,7 @@ void CWeapon::GiveTo(const Reference< CPlayer > & player) const noexcept
|
||||
}
|
||||
}
|
||||
|
||||
void CWeapon::SetOn(const Reference< CPlayer > & player, SQInt32 ammo) const noexcept
|
||||
void CWeapon::SetOn(const Reference< CPlayer > & player, SQInt32 ammo) const
|
||||
{
|
||||
if (*this && player)
|
||||
{
|
||||
@ -321,7 +321,7 @@ void CWeapon::SetOn(const Reference< CPlayer > & player, SQInt32 ammo) const noe
|
||||
}
|
||||
}
|
||||
|
||||
void CWeapon::GiveTo(const Reference< CPlayer > & player, SQInt32 ammo) const noexcept
|
||||
void CWeapon::GiveTo(const Reference< CPlayer > & player, SQInt32 ammo) const
|
||||
{
|
||||
if (*this && player)
|
||||
{
|
||||
|
Reference in New Issue
Block a user