diff options
author | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-07-13 00:54:58 +0200 |
---|---|---|
committer | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-07-13 00:54:58 +0200 |
commit | f6f27a139e67edf4f400dfae52b66fa24f5b8b29 (patch) | |
tree | b8ff113b4dc299526c8f33573ca4e0491683dc5b /src/CraftingRecipes.cpp | |
parent | Merge pull request #2339 from mmdk95/master (diff) | |
parent | Changing the shared_ptr/unique_ptr constructors to the make_shared/make_unique functions (diff) | |
download | cuberite-f6f27a139e67edf4f400dfae52b66fa24f5b8b29.tar cuberite-f6f27a139e67edf4f400dfae52b66fa24f5b8b29.tar.gz cuberite-f6f27a139e67edf4f400dfae52b66fa24f5b8b29.tar.bz2 cuberite-f6f27a139e67edf4f400dfae52b66fa24f5b8b29.tar.lz cuberite-f6f27a139e67edf4f400dfae52b66fa24f5b8b29.tar.xz cuberite-f6f27a139e67edf4f400dfae52b66fa24f5b8b29.tar.zst cuberite-f6f27a139e67edf4f400dfae52b66fa24f5b8b29.zip |
Diffstat (limited to '')
-rw-r--r-- | src/CraftingRecipes.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/CraftingRecipes.cpp b/src/CraftingRecipes.cpp index c6a407d4b..0bb77d341 100644 --- a/src/CraftingRecipes.cpp +++ b/src/CraftingRecipes.cpp @@ -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; |