Skip to content

Commit

Permalink
Fix windows build warnings
Browse files Browse the repository at this point in the history
Remove erroneous assertion
  • Loading branch information
grantramsay committed Mar 2, 2019
1 parent 78bd75a commit fad9e90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions components/render/atlastexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,11 @@ namespace Render
// of graphics cards are limited to 8192, not quite sure how it ever worked..
release_assert(paddedWidth <= mTextureWidth && paddedHeight <= mTextureHeight); // Texture size too small...

rbp::Rect packedPos;
rbp::Rect packedPos = rbp::Rect();
int32_t layer;
for (layer = 0; layer < mTextureLayers; layer++)
{
packedPos = mBinPacker[layer]->Insert(paddedWidth, paddedHeight, rbp::MaxRectsBinPack::RectBestAreaFit);
release_assert(packedPos.height != 0);
if (packedPos.height != 0)
break;
}
Expand Down
2 changes: 1 addition & 1 deletion extern/RectangleBinPack/MaxRectsBinPack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void MaxRectsBinPack::Init(int width, int height, bool allowFlip)

Rect MaxRectsBinPack::Insert(int width, int height, FreeRectChoiceHeuristic method)
{
Rect newNode;
Rect newNode = Rect();
// Unused in this function. We don't need to know the score after finding the position.
int score1 = std::numeric_limits<int>::max();
int score2 = std::numeric_limits<int>::max();
Expand Down

0 comments on commit fad9e90

Please sign in to comment.