1
0

Fixed compile warnings.

This commit is contained in:
Howaner 2014-08-31 20:53:41 +02:00
parent 66417f7a48
commit 0d392f53ed
2 changed files with 5 additions and 5 deletions

View File

@ -77,7 +77,7 @@ void cFurnaceRecipe::ReloadRecipes(void)
size_t FirstCommentSymbol = ParsingLine.find('#'); size_t FirstCommentSymbol = ParsingLine.find('#');
if ((FirstCommentSymbol != AString::npos) && (FirstCommentSymbol != 0)) if ((FirstCommentSymbol != AString::npos) && (FirstCommentSymbol != 0))
{ {
ParsingLine.erase(ParsingLine.begin() + FirstCommentSymbol, ParsingLine.end()); ParsingLine.erase(ParsingLine.begin() + (const long)FirstCommentSymbol, ParsingLine.end());
} }
switch (ParsingLine[0]) switch (ParsingLine[0])
@ -109,7 +109,7 @@ void cFurnaceRecipe::ReloadRecipes(void)
void cFurnaceRecipe::AddFuelFromLine(const AString & a_Line, int a_LineNum) void cFurnaceRecipe::AddFuelFromLine(const AString & a_Line, unsigned int a_LineNum)
{ {
AString Line(a_Line); AString Line(a_Line);
Line.erase(Line.begin()); // Remove the beginning "!" Line.erase(Line.begin()); // Remove the beginning "!"
@ -151,7 +151,7 @@ void cFurnaceRecipe::AddFuelFromLine(const AString & a_Line, int a_LineNum)
void cFurnaceRecipe::AddRecipeFromLine(const AString & a_Line, int a_LineNum) void cFurnaceRecipe::AddRecipeFromLine(const AString & a_Line, unsigned int a_LineNum)
{ {
AString Line(a_Line); AString Line(a_Line);
Line.erase(std::remove_if(Line.begin(), Line.end(), isspace), Line.end()); Line.erase(std::remove_if(Line.begin(), Line.end(), isspace), Line.end());

View File

@ -43,11 +43,11 @@ private:
/** Parses the fuel contained in the line, adds it to m_pState's fuels. /** Parses the fuel contained in the line, adds it to m_pState's fuels.
Logs a warning to the console on input error. */ Logs a warning to the console on input error. */
void AddFuelFromLine(const AString & a_Line, int a_LineNum); void AddFuelFromLine(const AString & a_Line, unsigned int a_LineNum);
/** Parses the recipe contained in the line, adds it to m_pState's recipes. /** Parses the recipe contained in the line, adds it to m_pState's recipes.
Logs a warning to the console on input error. */ Logs a warning to the console on input error. */
void AddRecipeFromLine(const AString & a_Line, int a_LineNum); void AddRecipeFromLine(const AString & a_Line, unsigned int a_LineNum);
/** Parses an item string in the format "<ItemType>[:<Damage>][,<Amount>]", returns true if successful. */ /** Parses an item string in the format "<ItemType>[:<Damage>][,<Amount>]", returns true if successful. */
bool ParseItem(const AString & a_String, cItem & a_Item); bool ParseItem(const AString & a_String, cItem & a_Item);