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
parent
77d4fdc0f6
commit
7931114b9f
|
@ -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
|
||||
|
|
|
@ -239,7 +239,7 @@ class Star : public CatEntry
|
|||
{
|
||||
public:
|
||||
Star() = default;
|
||||
~Star();
|
||||
virtual ~Star();
|
||||
|
||||
virtual Selection toSelection();
|
||||
|
||||
|
|
|
@ -493,6 +493,8 @@ static int object_type(lua_State* l)
|
|||
case Selection::Type_Nil:
|
||||
tname = "null";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
lua_pushstring(l, tname);
|
||||
|
|
Loading…
Reference in New Issue