melatonin_blur icon indicating copy to clipboard operation
melatonin_blur copied to clipboard

Compile Warning: 'melatonin::internal::CachedShadows' has virtual functions but non-virtual destructor

Open JelleBakker opened this issue 1 year ago • 4 comments

See title

JelleBakker avatar Sep 03 '24 08:09 JelleBakker

What compiler is this with? (Not seeing this locally) Funny, I removed the explicit dtor because of this other warning when it was in place:

https://github.com/sudara/melatonin_blur/pull/65

sudara avatar Sep 03 '24 11:09 sudara

I'm building a Xcode project using Xcode 15.4 exported from a JUCE 8.0.1 projucer project, with recommended compiler flags (in macOS exporter settings) enabled. Does this answer your question?

JelleBakker avatar Sep 03 '24 13:09 JelleBakker

Yes, thanks! We have compiler warnings on the repo, so I guess I need to go investigate why the tests didn't fail...

sudara avatar Sep 03 '24 13:09 sudara

@sudara adding the following code in CachedShadows makes it compile with zero warnings:

CachedShadows (const CachedShadows&) = default;
CachedShadows& operator=(const CachedShadows&) = default;
virtual ~CachedShadows() = default;

JelleBakker avatar Oct 02 '24 09:10 JelleBakker

See https://github.com/sudara/melatonin_blur/pull/74

JelleBakker avatar Oct 15 '24 12:10 JelleBakker