Some emplace_back replacements (#5149)
* replace push_back with emplace_back when a new object was created in the function call
This commit is contained in:
@@ -65,7 +65,7 @@ void cMooshroom::OnRightClicked(cPlayer & a_Player)
|
||||
}
|
||||
|
||||
cItems Drops;
|
||||
Drops.push_back(cItem(E_BLOCK_RED_MUSHROOM, 5, 0));
|
||||
Drops.emplace_back(E_BLOCK_RED_MUSHROOM, 5, 0);
|
||||
m_World->SpawnItemPickups(Drops, GetPosX(), GetPosY(), GetPosZ(), 10);
|
||||
m_World->SpawnMob(GetPosX(), GetPosY(), GetPosZ(), mtCow, false);
|
||||
Destroy();
|
||||
|
||||
Reference in New Issue
Block a user