From 3daf253b7f4ed8243e3262faee35219335e3e088 Mon Sep 17 00:00:00 2001 From: 12xx12 <44411062+12xx12@users.noreply.github.com> Date: Sun, 7 Mar 2021 17:31:43 +0100 Subject: Some emplace_back replacements (#5149) * replace push_back with emplace_back when a new object was created in the function call --- src/Mobs/Monster.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Mobs/Monster.cpp') diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index b115b241a..237c50524 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -1521,7 +1521,7 @@ void cMonster::AddRandomUncommonDropItem(cItems & a_Drops, float a_Chance, short { if (GetRandomProvider().RandBool(a_Chance / 100.0)) { - a_Drops.push_back(cItem(a_Item, 1, a_ItemHealth)); + a_Drops.emplace_back(a_Item, 1, a_ItemHealth); } } -- cgit v1.2.3