Repository: sudara/melatonin_blur (language: cpp)

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


Discussion / hints:
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
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?
Yes, thanks! We have compiler warnings on the repo, so I guess I need to go investigate why the tests didn't fail...
@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;
```


Fix patch:
diff --git a/melatonin/internal/cached_shadows.h b/melatonin/internal/cached_shadows.h
index b61674b..1240d5d 100644
--- a/melatonin/internal/cached_shadows.h
+++ b/melatonin/internal/cached_shadows.h
@@ -9,9 +9,16 @@ namespace melatonin::internal
     {
     protected:
         CachedShadows() = default;
+        CachedShadows (const CachedShadows&) = default;
+        CachedShadows& operator= (const CachedShadows&) = default;
+        CachedShadows (CachedShadows&&) = default;
+        CachedShadows& operator= (CachedShadows&&) = default;
+        
         CachedShadows (std::initializer_list<ShadowParameters> shadowParameters, bool force_inner = false);
         explicit CachedShadows (const std::vector<ShadowParameters>& shadowParameters, bool force_inner = false);
-
+        
+        virtual ~CachedShadows() = default;
+        
     public:
 
         // store a copy of the path to compare against for caching


Test patch: