From 993fd14ddfc881cf5be951df77da0338124d68cc Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 17 Jul 2014 16:33:09 +0200 Subject: Fixed basic whitespace problems. Indenting by spaces and alignment by spaces, as well as trailing whitespace on non-empty lines. --- src/CraftingRecipes.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/CraftingRecipes.cpp') diff --git a/src/CraftingRecipes.cpp b/src/CraftingRecipes.cpp index 0f1951351..a2ce359f3 100644 --- a/src/CraftingRecipes.cpp +++ b/src/CraftingRecipes.cpp @@ -135,7 +135,7 @@ void cCraftingGrid::ConsumeGrid(const cCraftingGrid & a_Grid) { if ((a_Grid.m_Width != m_Width) || (a_Grid.m_Height != m_Height)) { - LOGWARNING("Consuming a grid of different dimensions: (%d, %d) vs (%d, %d)", + LOGWARNING("Consuming a grid of different dimensions: (%d, %d) vs (%d, %d)", a_Grid.m_Width, a_Grid.m_Height, m_Width, m_Height ); } @@ -196,7 +196,7 @@ void cCraftingGrid::Dump(void) #ifdef _DEBUG int idx = x + m_Width * y; #endif - LOGD("Slot (%d, %d): Type %d, health %d, count %d", + LOGD("Slot (%d, %d): Type %d, health %d, count %d", x, y, m_Items[idx].m_ItemType, m_Items[idx].m_ItemDamage, m_Items[idx].m_ItemCount ); } @@ -250,7 +250,7 @@ void cCraftingRecipe::Dump(void) { LOGD("Recipe ingredients:"); m_Ingredients.Dump(); - LOGD("Result: Type %d, health %d, count %d", + LOGD("Result: Type %d, health %d, count %d", m_Result.m_ItemType, m_Result.m_ItemDamage, m_Result.m_ItemCount ); } @@ -665,7 +665,7 @@ cCraftingRecipes::cRecipe * cCraftingRecipes::MatchRecipe(const cItem * a_Crafti const cItem & Item = itrS->m_Item; if ( - (itrS->x >= a_GridWidth) || + (itrS->x >= a_GridWidth) || (itrS->y >= a_GridHeight) || (Item.m_ItemType != a_CraftingGrid[GridID].m_ItemType) || // same item type? (Item.m_ItemCount > a_CraftingGrid[GridID].m_ItemCount) || // not enough items -- cgit v1.2.3 From 7fff12bfacbb4bef1c02cea0ec10fdc9a6fb64e4 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 17 Jul 2014 19:13:23 +0200 Subject: Fixed spaces around single-line comments. There should be at least two spaces in front and one space after //-style comments. --- src/CraftingRecipes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/CraftingRecipes.cpp') diff --git a/src/CraftingRecipes.cpp b/src/CraftingRecipes.cpp index a2ce359f3..e9946160f 100644 --- a/src/CraftingRecipes.cpp +++ b/src/CraftingRecipes.cpp @@ -838,7 +838,7 @@ void cCraftingRecipes::HandleFireworks(const cItem * a_CraftingGrid, cCraftingRe case E_ITEM_GOLD_NUGGET: a_Recipe->m_Result.m_FireworkItem.m_Type = 2; break; case E_ITEM_FEATHER: a_Recipe->m_Result.m_FireworkItem.m_Type = 4; break; case E_ITEM_HEAD: a_Recipe->m_Result.m_FireworkItem.m_Type = 3; break; - default: LOG("Unexpected item in firework star recipe, was the crafting file's fireworks section changed?"); break; // ermahgerd BARD ardmins + default: LOG("Unexpected item in firework star recipe, was the crafting file's fireworks section changed?"); break; // ermahgerd BARD ardmins } } -- cgit v1.2.3 From 2423fbf2efa39e28cc348acc11b9269e573dcdef Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 17 Jul 2014 22:15:34 +0200 Subject: Normalized comments. This was mostly done automatically and then visually inspected for obvious errors. All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign. --- src/CraftingRecipes.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/CraftingRecipes.cpp') diff --git a/src/CraftingRecipes.cpp b/src/CraftingRecipes.cpp index e9946160f..e60c407d0 100644 --- a/src/CraftingRecipes.cpp +++ b/src/CraftingRecipes.cpp @@ -12,7 +12,7 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// // cCraftingGrid: cCraftingGrid::cCraftingGrid(int a_Width, int a_Height) : @@ -206,7 +206,7 @@ void cCraftingGrid::Dump(void) -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// // cCraftingRecipe: cCraftingRecipe::cCraftingRecipe(const cCraftingGrid & a_CraftingGrid) : @@ -259,7 +259,7 @@ void cCraftingRecipe::Dump(void) -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// // cCraftingRecipes: cCraftingRecipes::cCraftingRecipes(void) -- cgit v1.2.3