Fix new warnings

- warning: deleting object of polymorphic class type ‘Star’ which has
   non-virtual destructor might cause undefined behavior
   [-Wdelete-non-virtual-dtor]
 - enumeration value ‘Type_Generic’ not handled in switch [-Wswitch]
pull/3/head
Hleb Valoshka 2018-12-07 21:25:13 +03:00
parent 77d4fdc0f6
commit 7931114b9f
3 changed files with 4 additions and 2 deletions

View File

@ -111,7 +111,7 @@ class Body : public CatEntry
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Body(PlanetarySystem*, const std::string& name);
~Body();
virtual ~Body();
// Object class enumeration:
// All of these values must be powers of two so that they can

View File

@ -239,7 +239,7 @@ class Star : public CatEntry
{
public:
Star() = default;
~Star();
virtual ~Star();
virtual Selection toSelection();

View File

@ -493,6 +493,8 @@ static int object_type(lua_State* l)
case Selection::Type_Nil:
tname = "null";
break;
default:
break;
}
lua_pushstring(l, tname);