diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-12-13 13:11:01 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-12-13 13:11:01 +0100 |
commit | 4b20a615192baeb5ef0a04a10161a03428cda8cd (patch) | |
tree | c6f25102267b0cc4a444f6e746679405948142b0 /src/CraftingRecipes.cpp | |
parent | Fixed compilation? (diff) | |
parent | Merge pull request #1660 from Seadragon91/master (diff) | |
download | cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar.gz cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar.bz2 cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar.lz cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar.xz cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar.zst cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.zip |
Diffstat (limited to 'src/CraftingRecipes.cpp')
-rw-r--r-- | src/CraftingRecipes.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/CraftingRecipes.cpp b/src/CraftingRecipes.cpp index 64fb21181..202fb900e 100644 --- a/src/CraftingRecipes.cpp +++ b/src/CraftingRecipes.cpp @@ -289,12 +289,12 @@ void cCraftingRecipes::GetRecipe(cPlayer & a_Player, cCraftingGrid & a_CraftingG } // Built-in recipes: - std::auto_ptr<cRecipe> Recipe(FindRecipe(a_CraftingGrid.GetItems(), a_CraftingGrid.GetWidth(), a_CraftingGrid.GetHeight())); + std::unique_ptr<cRecipe> Recipe(FindRecipe(a_CraftingGrid.GetItems(), a_CraftingGrid.GetWidth(), a_CraftingGrid.GetHeight())); a_Recipe.Clear(); if (Recipe.get() == nullptr) { // Allow plugins to intercept a no-recipe-found situation: - cRoot::Get()->GetPluginManager()->CallHookCraftingNoRecipe(a_Player, a_CraftingGrid, &a_Recipe); + cRoot::Get()->GetPluginManager()->CallHookCraftingNoRecipe(a_Player, a_CraftingGrid, a_Recipe); return; } for (cRecipeSlots::const_iterator itr = Recipe->m_Ingredients.begin(); itr != Recipe->m_Ingredients.end(); ++itr) @@ -377,7 +377,7 @@ void cCraftingRecipes::AddRecipeLine(int a_LineNum, const AString & a_RecipeLine return; } - std::auto_ptr<cCraftingRecipes::cRecipe> Recipe(new cCraftingRecipes::cRecipe); + std::unique_ptr<cCraftingRecipes::cRecipe> Recipe(new cCraftingRecipes::cRecipe); // Parse the result: AStringVector ResultSplit = StringSplit(Sides[0], ","); @@ -758,7 +758,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::auto_ptr<cRecipe> Recipe(new cRecipe); + std::unique_ptr<cRecipe> Recipe(new cRecipe); Recipe->m_Result = a_Recipe->m_Result; Recipe->m_Width = a_Recipe->m_Width; Recipe->m_Height = a_Recipe->m_Height; |