angeluriot / Dimension3D

A simple graphics library (2D, 3D and windows).
MIT License
46 stars 10 forks source link

Is abstract but has non-virtual destructor #13

Open Lecrapouille opened 7 months ago

Lecrapouille commented 7 months ago

Bonjour, il manque des virtual ~xxx() = default;

/Users/runner/work/Janus/Janus/external/Dimension3D/sources/windows/Scene.cpp:38:3: warning: delete called on 'dim::Controller' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
                delete controller;
                ^
/Users/runner/work/Janus/Janus/external/Dimension3D/sources/windows/Scene.cpp:41:3: warning: delete called on 'dim::Camera' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
                delete camera;
                ^
/Users/runner/work/Janus/Janus/external/Dimension3D/sources/windows/Scene.cpp:53:3: warning: delete called on 'dim::Controller' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
                delete controller;
                ^
/Users/runner/work/Janus/Janus/external/Dimension3D/sources/windows/Scene.cpp:55:3: warning: delete called on 'dim::Camera' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
                delete camera;
                ^
/Users/runner/work/Janus/Janus/external/Dimension3D/sources/windows/Scene.cpp:200:3: warning: delete called on 'dim::Camera' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
                delete this->camera;
                ^
/Users/runner/work/Janus/Janus/external/Dimension3D/sources/windows/Scene.cpp:215:3: warning: delete called on 'dim::Controller' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
                delete this->controller;
                ^
/Users/runner/work/Janus/Janus/external/Dimension3D/sources/windows/Scene.cpp:330:4: warning: delete called on 'dim::Light' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
                        delete light;
                        ^
angeluriot commented 4 months ago

Possible de faire une PR ?

Lecrapouille commented 4 months ago

PR opened. Tested some time ago on a fork of your Galaxy simulation https://github.com/Lecrapouille/Janus (also compiled on Mac OS X with CI until I realized that it does run because OpenCL uses OpenGL 4 that is not supported by Mac)