1
0

Merge remote-tracking branch 'origin/furnaceparsing' into furnaceparsing

Conflicts:
	src/FurnaceRecipe.cpp
This commit is contained in:
Tiger Wang 2014-06-22 21:51:21 +01:00
commit dc8817feee
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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;