megaglest-source icon indicating copy to clipboard operation
megaglest-source copied to clipboard

warning: ‘throw’ will always call ‘terminate’

Open Rampoina opened this issue 2 years ago • 0 comments

The compilation throws this warning:

/mg-rampoina/source/glest_game/graphics/renderer.cpp: In destructor ‘virtual Glest::Game::Renderer::~Renderer()’:
/mg-rampoina/source/glest_game/graphics/renderer.cpp:353:17: warning: ‘throw’ will always call ‘terminate’ [-Wterminate]
  353 |                 throw megaglest_runtime_error(szBuf);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mg-rampoina/source/glest_game/graphics/renderer.cpp:353:17: note: in C++11 destructors default to ‘noexcept’

https://github.com/MegaGlest/megaglest-source/blob/develop/source/glest_game/graphics/renderer.cpp#L353

Rampoina avatar Aug 04 '22 11:08 Rampoina