1
0

A better hotfix for CraftingRecipies

This commit is contained in:
Tiger Wang 2014-08-29 15:12:45 +01:00
parent 431b7ed0b7
commit 389614c959

View File

@ -367,7 +367,7 @@ void cCraftingRecipes::ClearRecipes(void)
void cCraftingRecipes::AddRecipeLine(int a_LineNum, const AString & a_RecipeLine) void cCraftingRecipes::AddRecipeLine(int a_LineNum, const AString & a_RecipeLine)
{ {
AString RecipeLine(a_RecipeLine); AString RecipeLine(a_RecipeLine);
RecipeLine.erase(std::remove(RecipeLine.begin(), RecipeLine.end(), ' '), RecipeLine.end()); RecipeLine.erase(std::remove_if(RecipeLine.begin(), RecipeLine.end(), isspace), RecipeLine.end());
AStringVector Sides = StringSplit(RecipeLine, "="); AStringVector Sides = StringSplit(RecipeLine, "=");
if (Sides.size() != 2) if (Sides.size() != 2)