diff options
Diffstat (limited to 'src/FurnaceRecipe.cpp')
-rw-r--r-- | src/FurnaceRecipe.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/FurnaceRecipe.cpp b/src/FurnaceRecipe.cpp index ea952a852..a0c8560f1 100644 --- a/src/FurnaceRecipe.cpp +++ b/src/FurnaceRecipe.cpp @@ -77,7 +77,7 @@ void cFurnaceRecipe::ReloadRecipes(void) size_t FirstCommentSymbol = ParsingLine.find('#'); if ((FirstCommentSymbol != AString::npos) && (FirstCommentSymbol != 0)) { - ParsingLine.erase(ParsingLine.begin() + (const long)FirstCommentSymbol, ParsingLine.end()); + ParsingLine.erase(ParsingLine.begin() + static_cast<const long>(FirstCommentSymbol), ParsingLine.end()); } switch (ParsingLine[0]) @@ -115,13 +115,13 @@ void cFurnaceRecipe::AddFuelFromLine(const AString & a_Line, unsigned int a_Line Line.erase(Line.begin()); // Remove the beginning "!" Line.erase(std::remove_if(Line.begin(), Line.end(), isspace), Line.end()); - std::unique_ptr<cItem> Item(new cItem); + std::unique_ptr<cItem> Item = cpp14::make_unique<cItem>(); int BurnTime; const AStringVector & Sides = StringSplit(Line, "="); if (Sides.size() != 2) { - LOGWARNING("furnace.txt: line %d: A single '=' was expected, got %d", a_LineNum, (int)Sides.size() - 1); + LOGWARNING("furnace.txt: line %d: A single '=' was expected, got " SIZE_T_FMT, a_LineNum, Sides.size() - 1); LOGINFO("Offending line: \"%s\"", a_Line.c_str()); return; } @@ -157,13 +157,13 @@ void cFurnaceRecipe::AddRecipeFromLine(const AString & a_Line, unsigned int a_Li Line.erase(std::remove_if(Line.begin(), Line.end(), isspace), Line.end()); int CookTime = 200; - std::unique_ptr<cItem> InputItem(new cItem()); - std::unique_ptr<cItem> OutputItem(new cItem()); + std::unique_ptr<cItem> InputItem = cpp14::make_unique<cItem>(); + std::unique_ptr<cItem> OutputItem = cpp14::make_unique<cItem>(); const AStringVector & Sides = StringSplit(Line, "="); if (Sides.size() != 2) { - LOGWARNING("furnace.txt: line %d: A single '=' was expected, got %d", a_LineNum, (int)Sides.size() - 1); + LOGWARNING("furnace.txt: line %d: A single '=' was expected, got " SIZE_T_FMT, a_LineNum, Sides.size() - 1); LOGINFO("Offending line: \"%s\"", a_Line.c_str()); return; } |