libretro / beetle-bsnes-libretro

Standalone port of Mednafen bSNES to libretro, itself a fork of bsnes 0.59.
GNU General Public License v2.0
7 stars 15 forks source link

Silence -Wdelete-non-virtual-dtor warnings (Please review) #19

Closed orbea closed 7 years ago

orbea commented 7 years ago

NOTE: I am not sure I have this right, are there better ways of doing this?

Silences the following spammed -Wdelete-non-virtual-dtor warnings if compiled with clang.

In file included from mednafen/snes/src/cartridge/cartridge.cpp:1:
In file included from mednafen/snes/src/cartridge/../base.hpp:18:
./mednafen/snes/src/lib/nall/any.hpp:24:23: warning: delete called on 'nall::any::placeholder' that
      is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]
        if(container) delete container;
                      ^

Some references. https://stackoverflow.com/questions/270917/why-should-i-declare-a-virtual-destructor-for-an-abstract-class-in-c https://stackoverflow.com/questions/8764353/what-does-has-virtual-method-but-non-virtual-destructor-warning-mean-durin