~sircmpwn/xrgears

631c82f0b919f4cfed63d69507a0e00ce28ce9d4 — Lubosz Sarnecki 5 years ago 789b527
Fix -Wnon-virtual-dtor.
3 files changed, 3 insertions(+), 2 deletions(-)

M CMakeLists.txt
M vitamin-k/render/vikSwapChain.hpp
M vitamin-k/system/vikApplication.hpp
M CMakeLists.txt => CMakeLists.txt +1 -0
@@ 34,6 34,7 @@ add_cxxflag("-Wsuggest-attribute=const")
add_cxxflag("-Wundef")
add_cxxflag("-Wuninitialized")
add_cxxflag("-Wunreachable-code")
add_cxxflag("-Wnon-virtual-dtor")

# not fixed
#add_cxxflag("-Wconversion")

M vitamin-k/render/vikSwapChain.hpp => vitamin-k/render/vikSwapChain.hpp +1 -1
@@ 42,7 42,7 @@ class SwapChain {
  std::function<void(uint32_t index)> render_cb;

  SwapChain() {}
  ~SwapChain() {}
  virtual ~SwapChain() {}

  virtual void cleanup() = 0;


M vitamin-k/system/vikApplication.hpp => vitamin-k/system/vikApplication.hpp +1 -1
@@ 102,7 102,7 @@ class Application {
      camera->set_view_updated_cb([this]() { view_updated = true; });
  }

  ~Application()  {
  virtual ~Application()  {
    if (camera)
      delete camera;
    if (renderer)