Browse Source

GCC 4.6 compatibility: no delegating constructors.

Vladimír Vondruš 12 years ago
parent
commit
6af144f3d0
  1. 11
      src/Magnum/Buffer.cpp
  2. 2
      src/Magnum/Buffer.h

11
src/Magnum/Buffer.cpp

@ -171,6 +171,17 @@ Buffer::Buffer(const TargetHint targetHint): _targetHint{targetHint}
CORRADE_INTERNAL_ASSERT(_id != Implementation::State::DisengagedBinding); CORRADE_INTERNAL_ASSERT(_id != Implementation::State::DisengagedBinding);
} }
#ifdef MAGNUM_BUILD_DEPRECATED
Buffer::Buffer(const Target targetHint): _targetHint{static_cast<TargetHint>(targetHint)}
#ifdef CORRADE_TARGET_NACL
, _mappedBuffer{nullptr}
#endif
{
(this->*Context::current()->state().buffer->createImplementation)();
CORRADE_INTERNAL_ASSERT(_id != Implementation::State::DisengagedBinding);
}
#endif
void Buffer::createImplementationDefault() { void Buffer::createImplementationDefault() {
glGenBuffers(1, &_id); glGenBuffers(1, &_id);
_created = false; _created = false;

2
src/Magnum/Buffer.h

@ -774,7 +774,7 @@ class MAGNUM_EXPORT Buffer: public AbstractObject {
* @deprecated Use @ref Magnum::Buffer::Buffer(Magnum::Buffer::TargetHint) "Buffer(TargetHint)" * @deprecated Use @ref Magnum::Buffer::Buffer(Magnum::Buffer::TargetHint) "Buffer(TargetHint)"
* instead. * instead.
*/ */
CORRADE_DEPRECATED("use Buffer(TargetHint) instead") explicit Buffer(Target targetHint): Buffer{static_cast<TargetHint>(targetHint)} {} CORRADE_DEPRECATED("use Buffer(TargetHint) instead") explicit Buffer(Target targetHint);
#endif #endif
/** @brief Copying is not allowed */ /** @brief Copying is not allowed */

Loading…
Cancel
Save