Replaced MIN / MAX with std::min and std::max

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1455 0a769ca7-a7f5-676a-18bf-c427514a06d6
master
madmaxoft@gmail.com 2013-05-07 19:59:17 +00:00
parent 8aa88e7815
commit 959797dbcf
2 changed files with 5 additions and 5 deletions

View File

@ -583,10 +583,10 @@ cCraftingRecipes::cRecipe * cCraftingRecipes::FindRecipe(const cItem * a_Craftin
{
if (!a_CraftingGrid[x + y * a_GridWidth].IsEmpty())
{
GridRight = MAX(x, GridRight);
GridBottom = MAX(y, GridBottom);
GridLeft = MIN(x, GridLeft);
GridTop = MIN(y, GridTop);
GridRight = std::max(x, GridRight);
GridBottom = std::max(y, GridBottom);
GridLeft = std::min(x, GridLeft);
GridTop = std::min(y, GridTop);
}
}
int GridWidth = GridRight - GridLeft + 1;

View File

@ -398,7 +398,7 @@ void cLightingThread::PrepareSkyLight(void)
int Neighbor2 = m_HeightMap[idx - 1] + 1; // X - 1
int Neighbor3 = m_HeightMap[idx + cChunkDef::Width * 3] + 1; // Z + 1
int Neighbor4 = m_HeightMap[idx - cChunkDef::Width * 3] + 1; // Z - 1
int MaxNeighbor = MAX(MAX(Neighbor1, Neighbor2), MAX(Neighbor3, Neighbor4)); // Maximum of the four neighbors
int MaxNeighbor = std::max(std::max(Neighbor1, Neighbor2), std::max(Neighbor3, Neighbor4)); // Maximum of the four neighbors
// Fill the column from the top down to Current with all-light:
for (int y = cChunkDef::Height - 1, Index = idx + y * BlocksPerYLayer; y >= Current; y--, Index -= BlocksPerYLayer)