From f370992a98d977639a6668717af149bf709fc3b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 9 Oct 2013 23:04:36 +0200 Subject: [PATCH] GCC 4.5 compatibility: nullptr-related issues. --- src/Buffer.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Buffer.h b/src/Buffer.h index 3900f986f..18810d0b2 100644 --- a/src/Buffer.h +++ b/src/Buffer.h @@ -1015,7 +1015,11 @@ inline Buffer& Buffer::operator=(Buffer&& other) noexcept { #ifndef MAGNUM_TARGET_GLES template Containers::Array inline Buffer::data() { const Int bufferSize = size(); + #ifndef CORRADE_GCC45_COMPATIBILITY CORRADE_ASSERT(bufferSize%sizeof(T) == 0, "Buffer::data(): the buffer size is" << bufferSize << "bytes, which can't be expressed as array of types with size" << sizeof(T), nullptr); + #else + CORRADE_ASSERT(bufferSize%sizeof(T) == 0, "Buffer::data(): the buffer size is" << bufferSize << "bytes, which can't be expressed as array of types with size" << sizeof(T), {}); + #endif return subData(0, bufferSize/sizeof(T)); }