summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-22 22:51:21 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-22 22:51:21 +0200
commitdc8817feeee1513bf1e33ba5d462c36b0c79f012 (patch)
tree6bd5d7e7d8b3a5c86a2e26041c64ee445b93912c
parentSuggestions (diff)
parentFixed compile errors (diff)
downloadcuberite-dc8817feeee1513bf1e33ba5d462c36b0c79f012.tar
cuberite-dc8817feeee1513bf1e33ba5d462c36b0c79f012.tar.gz
cuberite-dc8817feeee1513bf1e33ba5d462c36b0c79f012.tar.bz2
cuberite-dc8817feeee1513bf1e33ba5d462c36b0c79f012.tar.lz
cuberite-dc8817feeee1513bf1e33ba5d462c36b0c79f012.tar.xz
cuberite-dc8817feeee1513bf1e33ba5d462c36b0c79f012.tar.zst
cuberite-dc8817feeee1513bf1e33ba5d462c36b0c79f012.zip
Diffstat (limited to '')
-rw-r--r--src/FurnaceRecipe.cpp4
-rw-r--r--src/FurnaceRecipe.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/FurnaceRecipe.cpp b/src/FurnaceRecipe.cpp
index 90b478285..d53854950 100644
--- a/src/FurnaceRecipe.cpp
+++ b/src/FurnaceRecipe.cpp
@@ -135,7 +135,7 @@ void cFurnaceRecipe::ReloadRecipes(void)
void cFurnaceRecipe::PrintParseError(unsigned int a_Line, size_t a_Position, const AString & a_CharactersMissing)
{
- LOGWARN("Error parsing furnace recipes at line %i pos %i: missing '%s'", a_Line, a_Position, a_CharactersMissing.c_str());
+ LOGWARN("Error parsing furnace recipes at line %i pos " SIZE_T_FMT ": missing '%s'", a_Line, a_Position, a_CharactersMissing.c_str());
}
@@ -179,7 +179,7 @@ bool cFurnaceRecipe::ReadMandatoryNumber(AString::size_type & a_Begin, const ASt
bool cFurnaceRecipe::ReadOptionalNumbers(AString::size_type & a_Begin, const AString & a_DelimiterOne, const AString & a_DelimiterTwo, const AString & a_Text, unsigned int a_Line, int & a_ValueOne, int & a_ValueTwo, bool a_IsLastValue)
{
// TODO: replace atoi with std::stoi
- unsigned int End, Begin = a_Begin;
+ AString::size_type End, Begin = a_Begin;
End = a_Text.find_first_of(a_DelimiterOne, Begin);
if (End != AString::npos)
diff --git a/src/FurnaceRecipe.h b/src/FurnaceRecipe.h
index cddcc215f..ab78b6051 100644
--- a/src/FurnaceRecipe.h
+++ b/src/FurnaceRecipe.h
@@ -42,7 +42,7 @@ private:
void ClearRecipes(void);
/** Calls LOGWARN with the line, position, and error */
- inline static void PrintParseError(unsigned int a_Line, size_t a_Position, const AString & a_CharactersMissing);
+ static void PrintParseError(unsigned int a_Line, size_t a_Position, const AString & a_CharactersMissing);
/** Reads a number from a string given, starting at a given position and ending at a delimiter given
Updates beginning position to the delimiter found + 1, and updates the value to the one read
@@ -60,7 +60,7 @@ private:
static bool ReadOptionalNumbers(AString::size_type & a_Begin, const AString & a_DelimiterOne, const AString & a_DelimiterTwo, const AString & a_Text, unsigned int a_Line, int & a_ValueOne, int & a_ValueTwo, bool a_IsLastValue = false);
/** Uses std::all_of to determine if a string contains only digits */
- inline static bool DoesStringContainOnlyNumbers(const AString & a_String);
+ static bool DoesStringContainOnlyNumbers(const AString & a_String);
struct sFurnaceRecipeState;