1
0

Changing the shared_ptr/unique_ptr constructors to the make_shared/make_unique functions

This commit is contained in:
bibo38
2015-07-12 20:58:19 +02:00
parent 9b3b047004
commit 0cb0bbe51a
4 changed files with 73 additions and 73 deletions

View File

@@ -385,7 +385,7 @@ void cCraftingRecipes::AddRecipeLine(int a_LineNum, const AString & a_RecipeLine
return;
}
std::unique_ptr<cCraftingRecipes::cRecipe> Recipe(new cCraftingRecipes::cRecipe);
std::unique_ptr<cCraftingRecipes::cRecipe> Recipe = cpp14::make_unique<cCraftingRecipes::cRecipe>();
// Parse the result:
AStringVector ResultSplit = StringSplit(Sides[0], ",");
@@ -766,7 +766,7 @@ cCraftingRecipes::cRecipe * cCraftingRecipes::MatchRecipe(const cItem * a_Crafti
} // for y, for x
// The recipe has matched. Create a copy of the recipe and set its coords to match the crafting grid:
std::unique_ptr<cRecipe> Recipe(new cRecipe);
std::unique_ptr<cRecipe> Recipe = cpp14::make_unique<cRecipe>();
Recipe->m_Result = a_Recipe->m_Result;
Recipe->m_Width = a_Recipe->m_Width;
Recipe->m_Height = a_Recipe->m_Height;