Browse Source

GCC 4.6 compatibility: weird name conflicts. WTF.

pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
834d68945e
  1. 12
      src/Buffer.h

12
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<std::size_t size, class T> 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<std::size_t size, class T> 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

Loading…
Cancel
Save