Browse Source

Platform: mark Windowless*Context moves as noexcept.

pull/521/head
Aaron Gokaslan 5 years ago committed by Vladimír Vondruš
parent
commit
712a3b635f
  1. 4
      src/Magnum/Platform/WindowlessCglApplication.cpp
  2. 4
      src/Magnum/Platform/WindowlessCglApplication.h
  3. 4
      src/Magnum/Platform/WindowlessEglApplication.cpp
  4. 4
      src/Magnum/Platform/WindowlessEglApplication.h
  5. 4
      src/Magnum/Platform/WindowlessGlxApplication.cpp
  6. 4
      src/Magnum/Platform/WindowlessGlxApplication.h
  7. 4
      src/Magnum/Platform/WindowlessIosApplication.h
  8. 4
      src/Magnum/Platform/WindowlessIosApplication.mm
  9. 4
      src/Magnum/Platform/WindowlessWglApplication.cpp
  10. 4
      src/Magnum/Platform/WindowlessWglApplication.h
  11. 4
      src/Magnum/Platform/WindowlessWindowsEglApplication.cpp
  12. 4
      src/Magnum/Platform/WindowlessWindowsEglApplication.h

4
src/Magnum/Platform/WindowlessCglApplication.cpp

@ -72,7 +72,7 @@ WindowlessCglContext::WindowlessCglContext(const Configuration& configuration, G
Error() << "Platform::WindowlessCglContext: cannot create context"; Error() << "Platform::WindowlessCglContext: cannot create context";
} }
WindowlessCglContext::WindowlessCglContext(WindowlessCglContext&& other): _pixelFormat{other._pixelFormat}, _context{other._context} { WindowlessCglContext::WindowlessCglContext(WindowlessCglContext&& other) noexcept: _pixelFormat{other._pixelFormat}, _context{other._context} {
other._pixelFormat = {}; other._pixelFormat = {};
other._context = {}; other._context = {};
} }
@ -82,7 +82,7 @@ WindowlessCglContext::~WindowlessCglContext() {
if(_pixelFormat) CGLDestroyPixelFormat(_pixelFormat); if(_pixelFormat) CGLDestroyPixelFormat(_pixelFormat);
} }
WindowlessCglContext& WindowlessCglContext::operator=(WindowlessCglContext&& other) { WindowlessCglContext& WindowlessCglContext::operator=(WindowlessCglContext&& other) noexcept {
using std::swap; using std::swap;
swap(other._pixelFormat, _pixelFormat); swap(other._pixelFormat, _pixelFormat);
swap(other._context, _context); swap(other._context, _context);

4
src/Magnum/Platform/WindowlessCglApplication.h

@ -98,13 +98,13 @@ class WindowlessCglContext {
WindowlessCglContext(const WindowlessCglContext&) = delete; WindowlessCglContext(const WindowlessCglContext&) = delete;
/** @brief Move constructor */ /** @brief Move constructor */
WindowlessCglContext(WindowlessCglContext&& other); WindowlessCglContext(WindowlessCglContext&& other) noexcept;
/** @brief Copying is not allowed */ /** @brief Copying is not allowed */
WindowlessCglContext& operator=(const WindowlessCglContext&) = delete; WindowlessCglContext& operator=(const WindowlessCglContext&) = delete;
/** @brief Move assignment */ /** @brief Move assignment */
WindowlessCglContext& operator=(WindowlessCglContext&& other); WindowlessCglContext& operator=(WindowlessCglContext&& other) noexcept;
/** /**
* @brief Destructor * @brief Destructor

4
src/Magnum/Platform/WindowlessEglApplication.cpp

@ -499,7 +499,7 @@ WindowlessEglContext::WindowlessEglContext(const Configuration& configuration, G
#endif #endif
} }
WindowlessEglContext::WindowlessEglContext(WindowlessEglContext&& other): WindowlessEglContext::WindowlessEglContext(WindowlessEglContext&& other) noexcept:
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
_sharedContext{other._sharedContext}, _sharedContext{other._sharedContext},
#endif #endif
@ -541,7 +541,7 @@ WindowlessEglContext::~WindowlessEglContext() {
_display) eglTerminate(_display); _display) eglTerminate(_display);
} }
WindowlessEglContext& WindowlessEglContext::operator=(WindowlessEglContext&& other) { WindowlessEglContext& WindowlessEglContext::operator=(WindowlessEglContext&& other) noexcept {
using std::swap; using std::swap;
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
swap(other._sharedContext, _sharedContext); swap(other._sharedContext, _sharedContext);

4
src/Magnum/Platform/WindowlessEglApplication.h

@ -108,13 +108,13 @@ class WindowlessEglContext {
WindowlessEglContext(const WindowlessEglContext&) = delete; WindowlessEglContext(const WindowlessEglContext&) = delete;
/** @brief Move constructor */ /** @brief Move constructor */
WindowlessEglContext(WindowlessEglContext&& other); WindowlessEglContext(WindowlessEglContext&& other) noexcept;
/** @brief Copying is not allowed */ /** @brief Copying is not allowed */
WindowlessEglContext& operator=(const WindowlessEglContext&) = delete; WindowlessEglContext& operator=(const WindowlessEglContext&) = delete;
/** @brief Move assignment */ /** @brief Move assignment */
WindowlessEglContext& operator=(WindowlessEglContext&& other); WindowlessEglContext& operator=(WindowlessEglContext&& other) noexcept;
/** /**
* @brief Destructor * @brief Destructor

4
src/Magnum/Platform/WindowlessGlxApplication.cpp

@ -280,7 +280,7 @@ WindowlessGlxContext::WindowlessGlxContext(const WindowlessGlxContext::Configura
} }
} }
WindowlessGlxContext::WindowlessGlxContext(WindowlessGlxContext&& other): _display{other._display}, _pbuffer{other._pbuffer}, _context{other._context} { WindowlessGlxContext::WindowlessGlxContext(WindowlessGlxContext&& other) noexcept: _display{other._display}, _pbuffer{other._pbuffer}, _context{other._context} {
other._display = {}; other._display = {};
other._context = {}; other._context = {};
other._pbuffer = {}; other._pbuffer = {};
@ -292,7 +292,7 @@ WindowlessGlxContext::~WindowlessGlxContext() {
if(_display) XCloseDisplay(_display); if(_display) XCloseDisplay(_display);
} }
WindowlessGlxContext& WindowlessGlxContext::operator=(WindowlessGlxContext&& other) { WindowlessGlxContext& WindowlessGlxContext::operator=(WindowlessGlxContext&& other) noexcept {
using std::swap; using std::swap;
swap(other._display, _display); swap(other._display, _display);
swap(other._pbuffer, _pbuffer); swap(other._pbuffer, _pbuffer);

4
src/Magnum/Platform/WindowlessGlxApplication.h

@ -119,13 +119,13 @@ class WindowlessGlxContext {
WindowlessGlxContext(const WindowlessGlxContext&) = delete; WindowlessGlxContext(const WindowlessGlxContext&) = delete;
/** @brief Move constructor */ /** @brief Move constructor */
WindowlessGlxContext(WindowlessGlxContext&& other); WindowlessGlxContext(WindowlessGlxContext&& other) noexcept;
/** @brief Copying is not allowed */ /** @brief Copying is not allowed */
WindowlessGlxContext& operator=(const WindowlessGlxContext&) = delete; WindowlessGlxContext& operator=(const WindowlessGlxContext&) = delete;
/** @brief Move assignment */ /** @brief Move assignment */
WindowlessGlxContext& operator=(WindowlessGlxContext&& other); WindowlessGlxContext& operator=(WindowlessGlxContext&& other) noexcept;
/** /**
* @brief Destructor * @brief Destructor

4
src/Magnum/Platform/WindowlessIosApplication.h

@ -91,13 +91,13 @@ class WindowlessIosContext {
WindowlessIosContext(const WindowlessIosContext&) = delete; WindowlessIosContext(const WindowlessIosContext&) = delete;
/** @brief Move constructor */ /** @brief Move constructor */
WindowlessIosContext(WindowlessIosContext&& other); WindowlessIosContext(WindowlessIosContext&& other) noexcept;
/** @brief Copying is not allowed */ /** @brief Copying is not allowed */
WindowlessIosContext& operator=(const WindowlessIosContext&) = delete; WindowlessIosContext& operator=(const WindowlessIosContext&) = delete;
/** @brief Move assignment */ /** @brief Move assignment */
WindowlessIosContext& operator=(WindowlessIosContext&& other); WindowlessIosContext& operator=(WindowlessIosContext&& other) noexcept;
/** /**
* @brief Destructor * @brief Destructor

4
src/Magnum/Platform/WindowlessIosApplication.mm

@ -52,7 +52,7 @@ WindowlessIosContext::WindowlessIosContext(const Configuration&, GLContext*) {
} }
} }
WindowlessIosContext::WindowlessIosContext(WindowlessIosContext&& other): _context{other._context} { WindowlessIosContext::WindowlessIosContext(WindowlessIosContext&& other) noexcept: _context{other._context} {
other._context = {}; other._context = {};
} }
@ -60,7 +60,7 @@ WindowlessIosContext::~WindowlessIosContext() {
if(_context) [_context dealloc]; if(_context) [_context dealloc];
} }
WindowlessIosContext& WindowlessIosContext::operator=(WindowlessIosContext&& other) { WindowlessIosContext& WindowlessIosContext::operator=(WindowlessIosContext&& other) noexcept {
using std::swap; using std::swap;
swap(other._context, _context); swap(other._context, _context);
return *this; return *this;

4
src/Magnum/Platform/WindowlessWglApplication.cpp

@ -266,7 +266,7 @@ WindowlessWglContext::WindowlessWglContext(const Configuration& configuration, G
Error() << "Platform::WindowlessWglContext: cannot create context:" << GetLastError(); Error() << "Platform::WindowlessWglContext: cannot create context:" << GetLastError();
} }
WindowlessWglContext::WindowlessWglContext(WindowlessWglContext&& other): _window{other._window}, _deviceContext{other._deviceContext}, _context{other._context} { WindowlessWglContext::WindowlessWglContext(WindowlessWglContext&& other) noexcept: _window{other._window}, _deviceContext{other._deviceContext}, _context{other._context} {
other._window = {}; other._window = {};
other._deviceContext = {}; other._deviceContext = {};
other._context = {}; other._context = {};
@ -277,7 +277,7 @@ WindowlessWglContext::~WindowlessWglContext() {
if(_window) DestroyWindow(_window); if(_window) DestroyWindow(_window);
} }
WindowlessWglContext& WindowlessWglContext::operator=(WindowlessWglContext&& other) { WindowlessWglContext& WindowlessWglContext::operator=(WindowlessWglContext&& other) noexcept {
using std::swap; using std::swap;
swap(other._window, _window); swap(other._window, _window);
swap(other._deviceContext, _deviceContext); swap(other._deviceContext, _deviceContext);

4
src/Magnum/Platform/WindowlessWglApplication.h

@ -106,13 +106,13 @@ class WindowlessWglContext {
WindowlessWglContext(const WindowlessWglContext&) = delete; WindowlessWglContext(const WindowlessWglContext&) = delete;
/** @brief Move constructor */ /** @brief Move constructor */
WindowlessWglContext(WindowlessWglContext&& other); WindowlessWglContext(WindowlessWglContext&& other) noexcept;
/** @brief Copying is not allowed */ /** @brief Copying is not allowed */
WindowlessWglContext& operator=(const WindowlessWglContext&) = delete; WindowlessWglContext& operator=(const WindowlessWglContext&) = delete;
/** @brief Move assignment */ /** @brief Move assignment */
WindowlessWglContext& operator=(WindowlessWglContext&& other); WindowlessWglContext& operator=(WindowlessWglContext&& other) noexcept;
/** /**
* @brief Destructor * @brief Destructor

4
src/Magnum/Platform/WindowlessWindowsEglApplication.cpp

@ -163,7 +163,7 @@ WindowlessWindowsEglContext::WindowlessWindowsEglContext(const Configuration& co
Error() << "Platform::WindowlessWindowsEglContext: cannot create window surface:" << Implementation::eglErrorString(eglGetError()); Error() << "Platform::WindowlessWindowsEglContext: cannot create window surface:" << Implementation::eglErrorString(eglGetError());
} }
WindowlessWindowsEglContext::WindowlessWindowsEglContext(WindowlessWindowsEglContext&& other): _window{other._window}, _display{other._display}, _surface{other._surface}, _context{other._context} { WindowlessWindowsEglContext::WindowlessWindowsEglContext(WindowlessWindowsEglContext&& other) noexcept: _window{other._window}, _display{other._display}, _surface{other._surface}, _context{other._context} {
other._window = {}; other._window = {};
other._display = {}; other._display = {};
other._surface = {}; other._surface = {};
@ -177,7 +177,7 @@ WindowlessWindowsEglContext::~WindowlessWindowsEglContext() {
if(_window) DestroyWindow(_window); if(_window) DestroyWindow(_window);
} }
WindowlessWindowsEglContext& WindowlessWindowsEglContext::operator=(WindowlessWindowsEglContext&& other) { WindowlessWindowsEglContext& WindowlessWindowsEglContext::operator=(WindowlessWindowsEglContext&& other) noexcept {
using std::swap; using std::swap;
swap(other._window, _window); swap(other._window, _window);
swap(other._display, _display); swap(other._display, _display);

4
src/Magnum/Platform/WindowlessWindowsEglApplication.h

@ -91,13 +91,13 @@ class WindowlessWindowsEglContext {
WindowlessWindowsEglContext(const WindowlessWindowsEglContext&) = delete; WindowlessWindowsEglContext(const WindowlessWindowsEglContext&) = delete;
/** @brief Move constructor */ /** @brief Move constructor */
WindowlessWindowsEglContext(WindowlessWindowsEglContext&& other); WindowlessWindowsEglContext(WindowlessWindowsEglContext&& other) noexcept;
/** @brief Copying is not allowed */ /** @brief Copying is not allowed */
WindowlessWindowsEglContext& operator=(const WindowlessWindowsEglContext&) = delete; WindowlessWindowsEglContext& operator=(const WindowlessWindowsEglContext&) = delete;
/** @brief Move assignment */ /** @brief Move assignment */
WindowlessWindowsEglContext& operator=(WindowlessWindowsEglContext&& other); WindowlessWindowsEglContext& operator=(WindowlessWindowsEglContext&& other) noexcept;
/** /**
* @brief Destructor * @brief Destructor

Loading…
Cancel
Save