Browse Source

Fixed compilation with GCC 4.9.

Standards-conforming STL implementation has no implicit default
constructor for std::vector, making me write this ugly verbose code.
pull/34/head
Vladimír Vondruš 13 years ago
parent
commit
c2ad09706e
  1. 2
      src/MeshTools/Test/GenerateFlatNormalsTest.cpp
  2. 2
      src/Plugins/MagnumFont/MagnumFont.cpp
  3. 8
      src/Primitives/Capsule.cpp
  4. 8
      src/Primitives/Circle.cpp
  5. 8
      src/Primitives/Crosshair.cpp
  6. 4
      src/Primitives/Cube.cpp
  7. 4
      src/Primitives/Cylinder.cpp
  8. 2
      src/Primitives/Icosphere.cpp
  9. 2
      src/Primitives/Implementation/WireframeSpheroid.cpp
  10. 8
      src/Primitives/Line.cpp
  11. 6
      src/Primitives/Plane.cpp
  12. 6
      src/Primitives/Square.cpp
  13. 4
      src/Primitives/UVSphere.cpp
  14. 8
      src/SceneGraph/Object.hpp
  15. 8
      src/Text/AbstractFontConverter.cpp
  16. 2
      src/Text/GlyphCache.cpp
  17. 2
      src/TextureTools/Atlas.cpp
  18. 2
      src/TextureTools/Test/AtlasTest.cpp

2
src/MeshTools/Test/GenerateFlatNormalsTest.cpp

@ -50,7 +50,7 @@ void GenerateFlatNormalsTest::wrongIndexCount() {
std::vector<Vector3> normals;
std::tie(indices, normals) = MeshTools::generateFlatNormals({
0, 1
}, {});
}, std::vector<Vector3>{});
CORRADE_COMPARE(indices.size(), 0);
CORRADE_COMPARE(normals.size(), 0);

2
src/Plugins/MagnumFont/MagnumFont.cpp

@ -148,7 +148,7 @@ std::pair<Float, Float> MagnumFont::doOpenFile(const std::string& filename, Floa
std::pair<Float, Float> MagnumFont::openInternal(Utility::Configuration&& conf, Trade::ImageData2D&& image) {
/* Everything okay, save the data internally */
_opened = new Data{std::move(conf), std::move(image), std::unordered_map<char32_t, UnsignedInt>{}, {}};
_opened = new Data{std::move(conf), std::move(image), std::unordered_map<char32_t, UnsignedInt>{}, std::vector<Vector2>{}};
/* Glyph advances */
const std::vector<Utility::ConfigurationGroup*> glyphs = _opened->conf.groups("glyph");

8
src/Primitives/Capsule.cpp

@ -34,7 +34,7 @@
namespace Magnum { namespace Primitives {
Trade::MeshData2D Capsule2D::wireframe(UnsignedInt hemisphereRings, UnsignedInt cylinderRings, Float halfLength) {
CORRADE_ASSERT(hemisphereRings >= 1 && cylinderRings >= 1, "Capsule must have at least one hemisphere ring, one cylinder ring and three segments", Trade::MeshData2D(Mesh::Primitive::Lines, {}, {}, {}));
CORRADE_ASSERT(hemisphereRings >= 1 && cylinderRings >= 1, "Capsule must have at least one hemisphere ring, one cylinder ring and three segments", Trade::MeshData2D(Mesh::Primitive::Lines, std::vector<UnsignedInt>{}, std::vector<std::vector<Vector2>>{}, std::vector<std::vector<Vector2>>{}));
std::vector<Vector2> positions;
positions.reserve(hemisphereRings*4+2+(cylinderRings-1)*2);
@ -85,11 +85,11 @@ Trade::MeshData2D Capsule2D::wireframe(UnsignedInt hemisphereRings, UnsignedInt
{UnsignedInt(positions.size())-3, UnsignedInt(positions.size())-1,
UnsignedInt(positions.size())-2, UnsignedInt(positions.size())-1});
return Trade::MeshData2D(Mesh::Primitive::Lines, std::move(indices), {std::move(positions)}, {});
return Trade::MeshData2D(Mesh::Primitive::Lines, std::move(indices), {std::move(positions)}, std::vector<std::vector<Vector2>>{});
}
Trade::MeshData3D Capsule3D::solid(UnsignedInt hemisphereRings, UnsignedInt cylinderRings, UnsignedInt segments, Float halfLength, TextureCoords textureCoords) {
CORRADE_ASSERT(hemisphereRings >= 1 && cylinderRings >= 1 && segments >= 3, "Capsule must have at least one hemisphere ring, one cylinder ring and three segments", Trade::MeshData3D(Mesh::Primitive::Triangles, {}, {}, {}, {}));
CORRADE_ASSERT(hemisphereRings >= 1 && cylinderRings >= 1 && segments >= 3, "Capsule must have at least one hemisphere ring, one cylinder ring and three segments", Trade::MeshData3D(Mesh::Primitive::Triangles, std::vector<UnsignedInt>{}, std::vector<std::vector<Vector3>>{}, std::vector<std::vector<Vector3>>{}, std::vector<std::vector<Vector2>>{}));
Implementation::Spheroid capsule(segments, textureCoords == TextureCoords::Generate ?
Implementation::Spheroid::TextureCoords::Generate :
@ -123,7 +123,7 @@ Trade::MeshData3D Capsule3D::solid(UnsignedInt hemisphereRings, UnsignedInt cyli
}
Trade::MeshData3D Capsule3D::wireframe(const UnsignedInt hemisphereRings, const UnsignedInt cylinderRings, const UnsignedInt segments, const Float halfLength) {
CORRADE_ASSERT(hemisphereRings >= 1 && cylinderRings >= 1 && segments >= 4 && segments%4 == 0, "Primitives::Capsule::wireframe(): improper parameters", Trade::MeshData3D(Mesh::Primitive::Lines, {}, {}, {}, {}));
CORRADE_ASSERT(hemisphereRings >= 1 && cylinderRings >= 1 && segments >= 4 && segments%4 == 0, "Primitives::Capsule::wireframe(): improper parameters", Trade::MeshData3D(Mesh::Primitive::Lines, std::vector<UnsignedInt>{}, std::vector<std::vector<Vector3>>{}, std::vector<std::vector<Vector3>>{}, std::vector<std::vector<Vector2>>{}));
Implementation::WireframeSpheroid capsule(segments/4);

8
src/Primitives/Circle.cpp

@ -32,7 +32,7 @@ namespace Magnum { namespace Primitives {
Trade::MeshData2D Circle::solid(UnsignedInt segments) {
CORRADE_ASSERT(segments >= 3, "Primitives::Circle::solid(): segments must be >= 3",
Trade::MeshData2D(Mesh::Primitive::TriangleFan, {}, {}, {}));
Trade::MeshData2D(Mesh::Primitive::TriangleFan, std::vector<UnsignedInt>{}, std::vector<std::vector<Vector2>>{}, std::vector<std::vector<Vector2>>{}));
std::vector<Vector2> positions;
positions.reserve(segments+1);
@ -47,12 +47,12 @@ Trade::MeshData2D Circle::solid(UnsignedInt segments) {
positions.emplace_back(Math::cos(angle), Math::sin(angle));
}
return Trade::MeshData2D(Mesh::Primitive::TriangleFan, {}, {std::move(positions)}, {});
return Trade::MeshData2D(Mesh::Primitive::TriangleFan, std::vector<UnsignedInt>{}, {std::move(positions)}, std::vector<std::vector<Vector2>>{});
}
Trade::MeshData2D Circle::wireframe(UnsignedInt segments) {
CORRADE_ASSERT(segments >= 3, "Primitives::Circle::wireframe(): segments must be >= 3",
Trade::MeshData2D(Mesh::Primitive::LineLoop, {}, {}, {}));
Trade::MeshData2D(Mesh::Primitive::LineLoop, std::vector<UnsignedInt>{}, std::vector<std::vector<Vector2>>{}, std::vector<std::vector<Vector2>>{}));
std::vector<Vector2> positions;
positions.reserve(segments);
@ -64,7 +64,7 @@ Trade::MeshData2D Circle::wireframe(UnsignedInt segments) {
positions.emplace_back(Math::cos(angle), Math::sin(angle));
}
return Trade::MeshData2D(Mesh::Primitive::LineLoop, {}, {std::move(positions)}, {});
return Trade::MeshData2D(Mesh::Primitive::LineLoop, std::vector<UnsignedInt>{}, {std::move(positions)}, std::vector<std::vector<Vector2>>{});
}
}}

8
src/Primitives/Crosshair.cpp

@ -31,18 +31,18 @@
namespace Magnum { namespace Primitives {
Trade::MeshData2D Crosshair2D::wireframe() {
return Trade::MeshData2D(Mesh::Primitive::Lines, {}, {{
return Trade::MeshData2D(Mesh::Primitive::Lines, std::vector<UnsignedInt>{}, {{
{-1.0f, 0.0f}, {1.0f, 0.0f},
{ 0.0f, -1.0f}, {0.0f, 1.0f}
}}, {});
}}, std::vector<std::vector<Vector2>>{});
}
Trade::MeshData3D Crosshair3D::wireframe() {
return Trade::MeshData3D(Mesh::Primitive::Lines, {}, {{
return Trade::MeshData3D(Mesh::Primitive::Lines, std::vector<UnsignedInt>{}, {{
{-1.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f},
{ 0.0f, -1.0f, 0.0f}, {0.0f, 1.0f, 0.0f},
{ 0.0f, 0.0f, -1.0f}, {0.0f, 0.0f, 1.0f}
}}, {}, {});
}}, std::vector<std::vector<Vector3>>{}, std::vector<std::vector<Vector2>>{});
}
}}

4
src/Primitives/Cube.cpp

@ -97,7 +97,7 @@ Trade::MeshData3D Cube::solid() {
{-1.0f, 0.0f, 0.0f},
{-1.0f, 0.0f, 0.0f}, /* -X */
{-1.0f, 0.0f, 0.0f}
}}, {});
}}, std::vector<std::vector<Vector2>>{});
}
Trade::MeshData3D Cube::wireframe() {
@ -116,7 +116,7 @@ Trade::MeshData3D Cube::wireframe() {
{ 1.0f, -1.0f, -1.0f},
{ 1.0f, 1.0f, -1.0f},
{-1.0f, 1.0f, -1.0f}
}}, {}, {});
}}, std::vector<std::vector<Vector3>>{}, std::vector<std::vector<Vector2>>{});
}
}}

4
src/Primitives/Cylinder.cpp

@ -32,7 +32,7 @@
namespace Magnum { namespace Primitives {
Trade::MeshData3D Cylinder::solid(const UnsignedInt rings, const UnsignedInt segments, const Float halfLength, const Flags flags) {
CORRADE_ASSERT(rings >= 1 && segments >= 3, "Primitives::Cylinder::solid(): cylinder must have at least one ring and three segments", Trade::MeshData3D(Mesh::Primitive::Triangles, {}, {}, {}, {}));
CORRADE_ASSERT(rings >= 1 && segments >= 3, "Primitives::Cylinder::solid(): cylinder must have at least one ring and three segments", Trade::MeshData3D(Mesh::Primitive::Triangles, std::vector<UnsignedInt>{}, std::vector<std::vector<Vector3>>{}, std::vector<std::vector<Vector3>>{}, std::vector<std::vector<Vector2>>{}));
Implementation::Spheroid cylinder(segments, flags & Flag::GenerateTextureCoords ? Implementation::Spheroid::TextureCoords::Generate : Implementation::Spheroid::TextureCoords::DontGenerate);
@ -63,7 +63,7 @@ Trade::MeshData3D Cylinder::solid(const UnsignedInt rings, const UnsignedInt seg
}
Trade::MeshData3D Cylinder::wireframe(const UnsignedInt rings, const UnsignedInt segments, const Float halfLength) {
CORRADE_ASSERT(rings >= 1 && segments >= 4 && segments%4 == 0, "Primitives::Cylinder::wireframe(): improper parameters", Trade::MeshData3D(Mesh::Primitive::Lines, {}, {}, {}, {}));
CORRADE_ASSERT(rings >= 1 && segments >= 4 && segments%4 == 0, "Primitives::Cylinder::wireframe(): improper parameters", Trade::MeshData3D(Mesh::Primitive::Lines, std::vector<UnsignedInt>{}, std::vector<std::vector<Vector3>>{}, std::vector<std::vector<Vector3>>{}, std::vector<std::vector<Vector2>>{}));
Implementation::WireframeSpheroid cylinder(segments/4);

2
src/Primitives/Icosphere.cpp

@ -78,7 +78,7 @@ Trade::MeshData3D Icosphere::solid(const UnsignedInt subdivisions) {
MeshTools::removeDuplicates(indices, positions);
std::vector<Vector3> normals(positions);
return Trade::MeshData3D(Mesh::Primitive::Triangles, std::move(indices), {std::move(positions)}, {std::move(normals)}, {});
return Trade::MeshData3D(Mesh::Primitive::Triangles, std::move(indices), {std::move(positions)}, {std::move(normals)}, std::vector<std::vector<Vector2>>{});
}
}}

2
src/Primitives/Implementation/WireframeSpheroid.cpp

@ -109,7 +109,7 @@ void WireframeSpheroid::cylinder() {
}
Trade::MeshData3D WireframeSpheroid::finalize() {
return Trade::MeshData3D(Mesh::Primitive::Lines, std::move(_indices), {std::move(_positions)}, {}, {});
return Trade::MeshData3D(Mesh::Primitive::Lines, std::move(_indices), {std::move(_positions)}, std::vector<std::vector<Vector3>>{}, std::vector<std::vector<Vector2>>{});
}
}}}

8
src/Primitives/Line.cpp

@ -31,15 +31,15 @@
namespace Magnum { namespace Primitives {
Trade::MeshData2D Line2D::wireframe() {
return Trade::MeshData2D(Mesh::Primitive::Lines, {}, {{
return Trade::MeshData2D(Mesh::Primitive::Lines, std::vector<UnsignedInt>{}, {{
{0.0f, 0.0f}, {1.0f, 0.0f}
}}, {});
}}, std::vector<std::vector<Vector2>>{});
}
Trade::MeshData3D Line3D::wireframe() {
return Trade::MeshData3D(Mesh::Primitive::Lines, {}, {{
return Trade::MeshData3D(Mesh::Primitive::Lines, std::vector<UnsignedInt>{}, {{
{0.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f},
}}, {}, {});
}}, std::vector<std::vector<Vector3>>{}, std::vector<std::vector<Vector2>>{});
}
}}

6
src/Primitives/Plane.cpp

@ -38,7 +38,7 @@ Trade::MeshData3D Plane::solid(const TextureCoords textureCoords) {
{0.0f, 1.0f}
});
return Trade::MeshData3D(Mesh::Primitive::TriangleStrip, {}, {{
return Trade::MeshData3D(Mesh::Primitive::TriangleStrip, std::vector<UnsignedInt>{}, {{
{1.0f, -1.0f, 0.0f},
{1.0f, 1.0f, 0.0f},
{-1.0f, -1.0f, 0.0f},
@ -52,12 +52,12 @@ Trade::MeshData3D Plane::solid(const TextureCoords textureCoords) {
}
Trade::MeshData3D Plane::wireframe() {
return Trade::MeshData3D(Mesh::Primitive::LineLoop, {}, {{
return Trade::MeshData3D(Mesh::Primitive::LineLoop, std::vector<UnsignedInt>{}, {{
{-1.0f, -1.0f, 0.0f},
{1.0f, -1.0f, 0.0f},
{1.0f, 1.0f, 0.0f},
{-1.0f, 1.0f, 0.0f}
}}, {}, {});
}}, std::vector<std::vector<Vector3>>{}, std::vector<std::vector<Vector2>>{});
}
}}

6
src/Primitives/Square.cpp

@ -38,7 +38,7 @@ Trade::MeshData2D Square::solid(const TextureCoords textureCoords) {
{0.0f, 1.0f}
});
return Trade::MeshData2D(Mesh::Primitive::TriangleStrip, {}, {{
return Trade::MeshData2D(Mesh::Primitive::TriangleStrip, std::vector<UnsignedInt>{}, {{
{1.0f, -1.0f},
{1.0f, 1.0f},
{-1.0f, -1.0f},
@ -47,12 +47,12 @@ Trade::MeshData2D Square::solid(const TextureCoords textureCoords) {
}
Trade::MeshData2D Square::wireframe() {
return Trade::MeshData2D(Mesh::Primitive::LineLoop, {}, {{
return Trade::MeshData2D(Mesh::Primitive::LineLoop, std::vector<UnsignedInt>{}, {{
{-1.0f, -1.0f},
{1.0f, -1.0f},
{1.0f, 1.0f},
{-1.0f, 1.0f}
}}, {});
}}, std::vector<std::vector<Vector2>>{});
}
}}

4
src/Primitives/UVSphere.cpp

@ -32,7 +32,7 @@
namespace Magnum { namespace Primitives {
Trade::MeshData3D UVSphere::solid(UnsignedInt rings, UnsignedInt segments, TextureCoords textureCoords) {
CORRADE_ASSERT(rings >= 2 && segments >= 3, "UVSphere must have at least two rings and three segments", Trade::MeshData3D(Mesh::Primitive::Triangles, {}, {}, {}, {}));
CORRADE_ASSERT(rings >= 2 && segments >= 3, "UVSphere must have at least two rings and three segments", Trade::MeshData3D(Mesh::Primitive::Triangles, std::vector<UnsignedInt>{}, std::vector<std::vector<Vector3>>{}, std::vector<std::vector<Vector3>>{}, std::vector<std::vector<Vector2>>{}));
Implementation::Spheroid sphere(segments, textureCoords == TextureCoords::Generate ?
Implementation::Spheroid::TextureCoords::Generate :
@ -59,7 +59,7 @@ Trade::MeshData3D UVSphere::solid(UnsignedInt rings, UnsignedInt segments, Textu
}
Trade::MeshData3D UVSphere::wireframe(const UnsignedInt rings, const UnsignedInt segments) {
CORRADE_ASSERT(rings >= 2 && rings%2 == 0 && segments >= 4 && segments%2 == 0, "Primitives::UVSphere::wireframe(): improper parameters", Trade::MeshData3D(Mesh::Primitive::Lines, {}, {}, {}, {}));
CORRADE_ASSERT(rings >= 2 && rings%2 == 0 && segments >= 4 && segments%2 == 0, "Primitives::UVSphere::wireframe(): improper parameters", Trade::MeshData3D(Mesh::Primitive::Lines, std::vector<UnsignedInt>{}, std::vector<std::vector<Vector3>>{}, std::vector<std::vector<Vector3>>{}, std::vector<std::vector<Vector2>>{}));
Implementation::WireframeSpheroid sphere(segments/4);

8
src/SceneGraph/Object.hpp

@ -194,7 +194,7 @@ computed and recursively concatenated together. Resulting transformations for
joints which were originally in `object` list is then returned.
*/
template<class Transformation> std::vector<typename Transformation::DataType> Object<Transformation>::transformations(std::vector<Object<Transformation>*> objects, const typename Transformation::DataType& initialTransformation) const {
CORRADE_ASSERT(objects.size() < 0xFFFFu, "SceneGraph::Object::transformations(): too large scene", {});
CORRADE_ASSERT(objects.size() < 0xFFFFu, "SceneGraph::Object::transformations(): too large scene", std::vector<typename Transformation::DataType>{});
/* Remember object count for later */
std::size_t objectCount = objects.size();
@ -217,7 +217,7 @@ template<class Transformation> std::vector<typename Transformation::DataType> Ob
const Scene<Transformation>* scene = this->scene();
/* Nearest common ancestor not yet implemented - assert this is done on scene */
CORRADE_ASSERT(scene == this, "SceneGraph::Object::transformationMatrices(): currently implemented only for Scene", {});
CORRADE_ASSERT(scene == this, "SceneGraph::Object::transformationMatrices(): currently implemented only for Scene", std::vector<typename Transformation::DataType>{});
/* Mark all objects up the hierarchy as visited */
auto it = objects.begin();
@ -235,7 +235,7 @@ template<class Transformation> std::vector<typename Transformation::DataType> Ob
/* If this is root object, remove from list */
if(!parent) {
CORRADE_ASSERT(*it == scene, "SceneGraph::Object::transformations(): the objects are not part of the same tree", {});
CORRADE_ASSERT(*it == scene, "SceneGraph::Object::transformations(): the objects are not part of the same tree", std::vector<typename Transformation::DataType>{});
it = objects.erase(it);
/* Parent is an joint or already visited - remove current from list */
@ -246,7 +246,7 @@ template<class Transformation> std::vector<typename Transformation::DataType> Ob
list of joint objects */
if(!(parent->flags & Flag::Joint)) {
CORRADE_ASSERT(jointObjects.size() < 0xFFFFu,
"SceneGraph::Object::transformations(): too large scene", {});
"SceneGraph::Object::transformations(): too large scene", std::vector<typename Transformation::DataType>{});
CORRADE_INTERNAL_ASSERT(parent->counter == 0xFFFFu);
parent->counter = jointObjects.size();
parent->flags |= Flag::Joint;

8
src/Text/AbstractFontConverter.cpp

@ -40,7 +40,7 @@ AbstractFontConverter::AbstractFontConverter(PluginManager::AbstractManager* man
std::vector<std::pair<std::string, Containers::Array<unsigned char>>> AbstractFontConverter::exportFontToData(AbstractFont& font, GlyphCache& cache, const std::string& filename, const std::string& characters) const {
CORRADE_ASSERT(features() >= (Feature::ExportFont|Feature::ConvertData),
"Text::AbstractFontConverter::exportFontToData(): feature not supported", {});
"Text::AbstractFontConverter::exportFontToData(): feature not supported", (std::vector<std::pair<std::string, Containers::Array<unsigned char>>>{}));
return doExportFontToData(font, cache, filename, uniqueUnicode(characters));
}
@ -52,7 +52,7 @@ std::vector<std::pair<std::string, Containers::Array<unsigned char>>> AbstractFo
#endif
{
CORRADE_ASSERT(!(features() & Feature::MultiFile),
"Text::AbstractFontConverter::exportFontToData(): feature advertised but not implemented", {});
"Text::AbstractFontConverter::exportFontToData(): feature advertised but not implemented", (std::vector<std::pair<std::string, Containers::Array<unsigned char>>>{}));
std::vector<std::pair<std::string, Containers::Array<unsigned char>>> out;
out.emplace_back(filename, std::move(doExportFontToSingleData(font, cache, characters)));
@ -113,14 +113,14 @@ bool AbstractFontConverter::doExportFontToFile(AbstractFont& font, GlyphCache& c
std::vector<std::pair<std::string, Containers::Array<unsigned char>>> AbstractFontConverter::exportGlyphCacheToData(GlyphCache& cache, const std::string& filename) const {
CORRADE_ASSERT(features() >= (Feature::ExportGlyphCache|Feature::ConvertData),
"Text::AbstractFontConverter::exportGlyphCacheToData(): feature not supported", {});
"Text::AbstractFontConverter::exportGlyphCacheToData(): feature not supported", (std::vector<std::pair<std::string, Containers::Array<unsigned char>>>{}));
return doExportGlyphCacheToData(cache, filename);
}
std::vector<std::pair<std::string, Containers::Array<unsigned char>>> AbstractFontConverter::doExportGlyphCacheToData(GlyphCache& cache, const std::string& filename) const {
CORRADE_ASSERT(!(features() & Feature::MultiFile),
"Text::AbstractFontConverter::exportGlyphCacheToData(): feature advertised but not implemented", {});
"Text::AbstractFontConverter::exportGlyphCacheToData(): feature advertised but not implemented", (std::vector<std::pair<std::string, Containers::Array<unsigned char>>>{}));
std::vector<std::pair<std::string, Containers::Array<unsigned char>>> out;
out.emplace_back(filename, std::move(doExportGlyphCacheToSingleData(cache)));

2
src/Text/GlyphCache.cpp

@ -80,7 +80,7 @@ void GlyphCache::initialize(const TextureFormat internalFormat, const Vector2i&
std::vector<Rectanglei> GlyphCache::reserve(const std::vector<Vector2i>& sizes) {
CORRADE_ASSERT((glyphs.size() == 1 && glyphs.at(0) == std::pair<Vector2i, Rectanglei>()),
"Text::GlyphCache::reserve(): reserving space in non-empty cache is not yet implemented", {});
"Text::GlyphCache::reserve(): reserving space in non-empty cache is not yet implemented", std::vector<Rectanglei>{});
glyphs.reserve(glyphs.size() + sizes.size());
return TextureTools::atlas(_size, sizes, _padding);
}

2
src/TextureTools/Atlas.cpp

@ -30,7 +30,7 @@
namespace Magnum { namespace TextureTools {
std::vector<Rectanglei> atlas(const Vector2i& atlasSize, const std::vector<Vector2i>& sizes, const Vector2i& padding) {
if(sizes.empty()) return {};
if(sizes.empty()) return std::vector<Rectanglei>{};
/* Size of largest texture */
Vector2i maxSize;

2
src/TextureTools/Test/AtlasTest.cpp

@ -76,7 +76,7 @@ void AtlasTest::createPadding() {
}
void AtlasTest::createEmpty() {
std::vector<Rectanglei> atlas = TextureTools::atlas({}, {});
std::vector<Rectanglei> atlas = TextureTools::atlas({}, std::vector<Vector2i>{});
CORRADE_VERIFY(atlas.empty());
}

Loading…
Cancel
Save