diff --git a/src/Magnum/DebugOutput.cpp b/src/Magnum/DebugOutput.cpp index 26a80a5b0..37d59edf8 100644 --- a/src/Magnum/DebugOutput.cpp +++ b/src/Magnum/DebugOutput.cpp @@ -42,7 +42,8 @@ void APIENTRY #endif callbackWrapper(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam) { - Context::current()->state().debug->messageCallback(DebugOutput::Source(source), DebugOutput::Type(type), id, DebugOutput::Severity(severity), std::string{message, std::size_t(length)}, userParam); + /* GCC 4.5 doesn't like {} here */ + Context::current()->state().debug->messageCallback(DebugOutput::Source(source), DebugOutput::Type(type), id, DebugOutput::Severity(severity), std::string(message, std::size_t(length)), userParam); } #endif diff --git a/src/MagnumPlugins/TgaImageConverter/Test/TgaImageConverterTest.cpp b/src/MagnumPlugins/TgaImageConverter/Test/TgaImageConverterTest.cpp index 60a49e1cf..91457594a 100644 --- a/src/MagnumPlugins/TgaImageConverter/Test/TgaImageConverterTest.cpp +++ b/src/MagnumPlugins/TgaImageConverter/Test/TgaImageConverterTest.cpp @@ -107,8 +107,9 @@ void TgaImageConverterTest::data() { CORRADE_COMPARE(converted->format(), ColorFormat::RGB); #endif CORRADE_COMPARE(converted->type(), ColorType::UnsignedByte); - CORRADE_COMPARE((std::string{converted->data(), 2*3*3}), - (std::string{original.data(), 2*3*3})); + /* GCC 4.5 can't handle {} here */ + CORRADE_COMPARE(std::string(converted->data(), 2*3*3), + std::string(original.data(), 2*3*3)); } }}} diff --git a/src/MagnumPlugins/TgaImporter/Test/TgaImporterTest.cpp b/src/MagnumPlugins/TgaImporter/Test/TgaImporterTest.cpp index 4ce72096d..d92c6cc93 100644 --- a/src/MagnumPlugins/TgaImporter/Test/TgaImporterTest.cpp +++ b/src/MagnumPlugins/TgaImporter/Test/TgaImporterTest.cpp @@ -152,8 +152,9 @@ void TgaImporterTest::colorBits24() { #endif CORRADE_COMPARE(image->size(), Vector2i(2, 3)); CORRADE_COMPARE(image->type(), ColorType::UnsignedByte); - CORRADE_COMPARE((std::string{image->data(), 2*3*3}), - (std::string{pixels, 2*3*3})); + /* GCC 4.5 can't handle {} here */ + CORRADE_COMPARE(std::string(image->data(), 2*3*3), + std::string(pixels, 2*3*3)); } void TgaImporterTest::colorBits32() { @@ -184,8 +185,9 @@ void TgaImporterTest::colorBits32() { #endif CORRADE_COMPARE(image->size(), Vector2i(2, 3)); CORRADE_COMPARE(image->type(), ColorType::UnsignedByte); - CORRADE_COMPARE((std::string{image->data(), 2*3*3}), - (std::string{pixels, 2*3*3})); + /* GCC 4.5 can't handle {} here */ + CORRADE_COMPARE(std::string(image->data(), 2*3*3), + std::string(pixels, 2*3*3)); } void TgaImporterTest::grayscaleBits8() { @@ -207,8 +209,9 @@ void TgaImporterTest::grayscaleBits8() { #endif CORRADE_COMPARE(image->size(), Vector2i(2, 3)); CORRADE_COMPARE(image->type(), ColorType::UnsignedByte); - CORRADE_COMPARE((std::string{image->data(), 2*3}), - (std::string{data + 18, 2*3})); + /* GCC 4.5 can't handle {} here */ + CORRADE_COMPARE(std::string(image->data(), 2*3), + std::string(data + 18, 2*3)); } void TgaImporterTest::grayscaleBits16() { @@ -241,8 +244,9 @@ void TgaImporterTest::file() { #endif CORRADE_COMPARE(image->size(), Vector2i(2, 3)); CORRADE_COMPARE(image->type(), ColorType::UnsignedByte); - CORRADE_COMPARE((std::string{image->data(), 2*3}), - (std::string{data + 18, 2*3})); + /* GCC 4.5 can't handle {} here */ + CORRADE_COMPARE(std::string(image->data(), 2*3), + std::string(data + 18, 2*3)); } }}} diff --git a/src/MagnumPlugins/TgaImporter/TgaImporter.cpp b/src/MagnumPlugins/TgaImporter/TgaImporter.cpp index b96e543af..f5be57fc9 100644 --- a/src/MagnumPlugins/TgaImporter/TgaImporter.cpp +++ b/src/MagnumPlugins/TgaImporter/TgaImporter.cpp @@ -70,7 +70,8 @@ auto TgaImporter::doFeatures() const -> Features { return Feature::OpenData; } bool TgaImporter::doIsOpened() const { return in; } void TgaImporter::doOpenData(const Containers::ArrayReference data) { - in = new std::istringstream{{data, data.size()}}; + /* GCC 4.5 can't handle {} here */ + in = new std::istringstream{std::string(data, data.size())}; } void TgaImporter::doOpenFile(const std::string& filename) {