diff options
author | bibo38 <bibo38@github.com> | 2015-07-12 20:58:19 +0200 |
---|---|---|
committer | bibo38 <bibo38@github.com> | 2015-07-12 21:02:47 +0200 |
commit | 0cb0bbe51ab7d2c80f54d8c7ae22b367ff833127 (patch) | |
tree | 5dad04d59b122af5710099331070366d5b8b1baa /src/CraftingRecipes.cpp | |
parent | Merge pull request #2330 from cuberite/libraryupdate (diff) | |
download | cuberite-0cb0bbe51ab7d2c80f54d8c7ae22b367ff833127.tar cuberite-0cb0bbe51ab7d2c80f54d8c7ae22b367ff833127.tar.gz cuberite-0cb0bbe51ab7d2c80f54d8c7ae22b367ff833127.tar.bz2 cuberite-0cb0bbe51ab7d2c80f54d8c7ae22b367ff833127.tar.lz cuberite-0cb0bbe51ab7d2c80f54d8c7ae22b367ff833127.tar.xz cuberite-0cb0bbe51ab7d2c80f54d8c7ae22b367ff833127.tar.zst cuberite-0cb0bbe51ab7d2c80f54d8c7ae22b367ff833127.zip |
Diffstat (limited to 'src/CraftingRecipes.cpp')
-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; |