From 834d68945e142ee8ffcf6f97f8e94d4b7cda539c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 4 Jun 2013 18:57:14 +0200 Subject: [PATCH] GCC 4.6 compatibility: weird name conflicts. WTF. --- src/Buffer.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Buffer.h b/src/Buffer.h index 9ef4d2c9f..00001239f 100644 --- a/src/Buffer.h +++ b/src/Buffer.h @@ -590,10 +590,16 @@ class MAGNUM_EXPORT Buffer { * * @see setData(GLsizeiptr, const GLvoid*, Usage). */ + #ifdef CORRADE_GCC46_COMPATIBILITY + #define size size_ /* With GCC 4.6 it conflicts with size(). WTF. */ + #endif template Buffer* setData(const T(&data)[size], Usage usage) { setData(size*sizeof(T), data, usage); return this; } + #ifdef CORRADE_GCC46_COMPATIBILITY + #undef size + #endif /** * @brief Set buffer data @@ -639,10 +645,16 @@ class MAGNUM_EXPORT Buffer { * * @see setSubData(GLintptr, GLsizeiptr, const GLvoid*) */ + #ifdef CORRADE_GCC46_COMPATIBILITY + #define size size_ /* With GCC 4.6 it conflicts with size(). WTF. */ + #endif template Buffer* setSubData(GLintptr offset, const T(&data)[size]) { setSubData(offset, size*sizeof(T), data); return this; } + #ifdef CORRADE_GCC46_COMPATIBILITY + #undef size + #endif /** * @brief Set buffer subdata