mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-05 10:17:46 +00:00
Change delModifier assert to return early instead
This commit is contained in:
parent
b5c603ac63
commit
ec3c109898
1 changed files with 3 additions and 1 deletions
|
@ -842,7 +842,9 @@ void Sapphire::Entity::Chara::addModifier( Common::ParamModifier paramModifier,
|
||||||
|
|
||||||
void Sapphire::Entity::Chara::delModifier( Common::ParamModifier paramModifier, int32_t value )
|
void Sapphire::Entity::Chara::delModifier( Common::ParamModifier paramModifier, int32_t value )
|
||||||
{
|
{
|
||||||
assert( m_modifiers.count( paramModifier ) != 0 );
|
if( m_modifiers.find( paramModifier ) == m_modifiers.end() )
|
||||||
|
return;
|
||||||
|
|
||||||
auto& mod = m_modifiers.at( paramModifier );
|
auto& mod = m_modifiers.at( paramModifier );
|
||||||
|
|
||||||
mod.erase( std::remove( mod.begin(), mod.end(), value ), mod.end() );
|
mod.erase( std::remove( mod.begin(), mod.end(), value ), mod.end() );
|
||||||
|
|
Loading…
Add table
Reference in a new issue