From 4d4b3e57e53a280862c695974551e84dd8acae02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 2 Dec 2013 15:52:18 +0100 Subject: [PATCH] GCC 4.5 compatibility: nullptr-related issues. --- src/Shapes/Composition.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Shapes/Composition.cpp b/src/Shapes/Composition.cpp index 456071772..83dced0d6 100644 --- a/src/Shapes/Composition.cpp +++ b/src/Shapes/Composition.cpp @@ -65,8 +65,13 @@ template Composition::Composition(const Comp } template Composition::Composition(Composition&& other): _shapes(std::move(other._shapes)), _nodes(std::move(other._nodes)) { + #ifndef CORRADE_GCC45_COMPATIBILITY other._shapes = nullptr; other._nodes = nullptr; + #else + other._shapes = {}; + other._nodes = {}; + #endif } template Composition::~Composition() { @@ -98,7 +103,11 @@ template Composition& Composition void Composition::copyShapes(const std::size_t offset, Composition&& other) { CORRADE_INTERNAL_ASSERT(_shapes.size() >= other._shapes.size()+offset); std::move(other._shapes.begin(), other._shapes.end(), _shapes.begin()+offset); + #ifndef CORRADE_GCC45_COMPATIBILITY other._shapes = nullptr; + #else + other._shapes = {}; + #endif } template void Composition::copyShapes(const std::size_t offset, const Composition& other) {