- fixed compile errors.
This commit is contained in:
parent
a5054b0882
commit
4b3adf548a
2 changed files with 7 additions and 6 deletions
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
#include <cassert>
|
||||
#include "templates.h"
|
||||
|
||||
#include "SkylineBinPack.h"
|
||||
|
||||
|
|
@ -131,7 +132,7 @@ bool SkylineBinPack::RectangleFits(int skylineNodeIndex, int width, int height,
|
|||
y = skyLine[skylineNodeIndex].y;
|
||||
while(widthLeft > 0)
|
||||
{
|
||||
y = max(y, skyLine[i].y);
|
||||
y = MAX(y, skyLine[i].y);
|
||||
if (y + height > binHeight)
|
||||
return false;
|
||||
widthLeft -= skyLine[i].width;
|
||||
|
|
@ -152,7 +153,7 @@ int SkylineBinPack::ComputeWastedArea(int skylineNodeIndex, int width, int heigh
|
|||
break;
|
||||
|
||||
int leftSide = skyLine[skylineNodeIndex].x;
|
||||
int rightSide = min(rectRight, leftSide + skyLine[skylineNodeIndex].width);
|
||||
int rightSide = MIN(rectRight, leftSide + skyLine[skylineNodeIndex].width);
|
||||
assert(y >= skyLine[skylineNodeIndex].y);
|
||||
wastedArea += (rightSide - leftSide) * (y - skyLine[skylineNodeIndex].y);
|
||||
}
|
||||
|
|
@ -179,7 +180,7 @@ void SkylineBinPack::AddWasteMapArea(int skylineNodeIndex, int width, int height
|
|||
break;
|
||||
|
||||
int leftSide = skyLine[skylineNodeIndex].x;
|
||||
int rightSide = min(rectRight, leftSide + skyLine[skylineNodeIndex].width);
|
||||
int rightSide = MIN(rectRight, leftSide + skyLine[skylineNodeIndex].width);
|
||||
assert(y >= skyLine[skylineNodeIndex].y);
|
||||
|
||||
Rect waste;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue