Browse Source

TextureTools: proper function name in assert.

pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
79d29ea947
  1. 6
      src/TextureTools/Atlas.cpp
  2. 2
      src/TextureTools/Test/AtlasTest.cpp

6
src/TextureTools/Atlas.cpp

@ -33,9 +33,9 @@ std::vector<Rectanglei> atlas(const Vector2i& atlasSize, const std::vector<Vecto
/* Columns and rows */ /* Columns and rows */
Vector2i gridSize = atlasSize/maxSize; Vector2i gridSize = atlasSize/maxSize;
if(std::size_t(gridSize.product()) < sizes.size()) { if(std::size_t(gridSize.product()) < sizes.size()) {
Error() << "TextureTools::Atlas::create(): requested atlas size" Error() << "TextureTools::atlas(): requested atlas size" << atlasSize
<< atlasSize << "is too small to fit" << sizes.size() << "is too small to fit" << sizes.size() << maxSize
<< maxSize << "textures. Generated atlas will be empty."; << "textures. Generated atlas will be empty.";
return atlas; return atlas;
} }

2
src/TextureTools/Test/AtlasTest.cpp

@ -65,7 +65,7 @@ void AtlasTest::createTooSmall() {
{23, 31} {23, 31}
}); });
CORRADE_VERIFY(atlas.empty()); CORRADE_VERIFY(atlas.empty());
CORRADE_COMPARE(o.str(), "TextureTools::Atlas::create(): requested atlas size Vector(64, 32) is too small to fit 3 Vector(25, 31) textures. Generated atlas will be empty.\n"); CORRADE_COMPARE(o.str(), "TextureTools::atlas(): requested atlas size Vector(64, 32) is too small to fit 3 Vector(25, 31) textures. Generated atlas will be empty.\n");
} }
}}} }}}

Loading…
Cancel
Save