Browse Source

Fix compilation with GCC > 4.6 and Clang.

This compatibility stuff is killing me.
Vladimír Vondruš 11 years ago
parent
commit
805620f8c9
  1. 5
      src/Magnum/Implementation/FramebufferState.cpp
  2. 6
      src/Magnum/Implementation/FramebufferState.h

5
src/Magnum/Implementation/FramebufferState.cpp

@ -34,9 +34,10 @@
namespace Magnum { namespace Implementation {
#ifndef CORRADE_GCC46_COMPATIBILITY
constexpr
#endif
constexpr const Range2Di FramebufferState::DisengagedViewport;
#else
const Range2Di FramebufferState::DisengagedViewport{{}, {-1, -1}};
#endif
FramebufferState::FramebufferState(Context& context, std::vector<std::string>& extensions): readBinding{0}, drawBinding{0}, renderbufferBinding{0}, maxDrawBuffers{0}, maxColorAttachments{0}, maxRenderbufferSize{0}, maxSamples{0},
#ifndef MAGNUM_TARGET_GLES

6
src/Magnum/Implementation/FramebufferState.h

@ -43,11 +43,11 @@
namespace Magnum { namespace Implementation {
struct FramebufferState {
/* Also, GCC 4.6 doesn't have non-static member initializers */
#ifndef CORRADE_GCC46_COMPATIBILITY
constexpr
#endif
constexpr static const Range2Di DisengagedViewport{{}, {-1, -1}};
#else
static const Range2Di DisengagedViewport;
#endif
explicit FramebufferState(Context& context, std::vector<std::string>& extensions);

Loading…
Cancel
Save