Browse Source

GL: Context move constructor should be marked noexcept.

pull/483/head
Vladimír Vondruš 6 years ago
parent
commit
1a626a1db5
  1. 2
      doc/changelog.dox
  2. 2
      src/Magnum/GL/Context.cpp
  3. 2
      src/Magnum/GL/Context.h
  4. 3
      src/Magnum/GL/Test/ContextTest.cpp

2
doc/changelog.dox

@ -188,6 +188,8 @@ See also:
@subsection changelog-latest-bugfixes Bug fixes
- @ref GL::Context move constructor was not marked @cpp noexcept @ce by
accident
- @ref Platform::EmscriptenApplication randomly created antialiased contexts
due to an uninitialized variable in its
@ref Platform::EmscriptenApplication::GLConfiguration "GLConfiguration"

2
src/Magnum/GL/Context.cpp

@ -660,7 +660,7 @@ Context::Context(NoCreateT, Utility::Arguments& args, Int argc, const char** arg
_disabledExtensions.push_back(extension);
}
Context::Context(Context&& other): _version{other._version},
Context::Context(Context&& other) noexcept: _version{other._version},
#ifndef MAGNUM_TARGET_WEBGL
_flags{other._flags},
#endif

2
src/Magnum/GL/Context.h

@ -492,7 +492,7 @@ class MAGNUM_GL_EXPORT Context {
Context(const Context&) = delete;
/** @brief Move constructor */
Context(Context&& other);
Context(Context&& other) noexcept;
~Context();

3
src/Magnum/GL/Test/ContextTest.cpp

@ -89,6 +89,9 @@ void ContextTest::constructCopyMove() {
CORRADE_VERIFY((std::is_constructible<Context, Context&&>{}));
CORRADE_VERIFY(!(std::is_assignable<Context, const Context&>{}));
CORRADE_VERIFY(!(std::is_assignable<Context, Context&&>{}));
CORRADE_VERIFY(std::is_nothrow_move_constructible<Context>::value);
/* No move assignment */
}
void ContextTest::makeCurrentNoOp() {

Loading…
Cancel
Save