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/Pig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Mobs/Pig.cpp') diff --git a/src/Mobs/Pig.cpp b/src/Mobs/Pig.cpp index 1e531aebd..2bcb94f2b 100644 --- a/src/Mobs/Pig.cpp +++ b/src/Mobs/Pig.cpp @@ -34,7 +34,7 @@ void cPig::GetDrops(cItems & a_Drops, cEntity * a_Killer) AddRandomDropItem(a_Drops, 1, 3 + LootingLevel, IsOnFire() ? E_ITEM_COOKED_PORKCHOP : E_ITEM_RAW_PORKCHOP); if (m_bIsSaddled) { - a_Drops.push_back(cItem(E_ITEM_SADDLE, 1)); + a_Drops.emplace_back(E_ITEM_SADDLE, 1); } } -- cgit v1.2.3