From 5446daaef985dad9a4881c839e3e3d8469dc1368 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 5 Mar 2022 23:40:01 +0100 Subject: [PATCH] Common: Make DynamicLibrary non-copyable The default implementations of DynamicLibrary's copy and move constructors and assignment operators are unsafe. --- Source/Core/Common/DynamicLibrary.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Core/Common/DynamicLibrary.h b/Source/Core/Common/DynamicLibrary.h index 775afce56c..edfcde8ff3 100644 --- a/Source/Core/Common/DynamicLibrary.h +++ b/Source/Core/Common/DynamicLibrary.h @@ -24,6 +24,12 @@ public: // Closes the library. ~DynamicLibrary(); + DynamicLibrary(const DynamicLibrary&) = delete; + DynamicLibrary(DynamicLibrary&&) = delete; + + DynamicLibrary& operator=(const DynamicLibrary&) = delete; + DynamicLibrary& operator=(DynamicLibrary&&) = delete; + // Returns the specified library name with the platform-specific suffix added. static std::string GetUnprefixedFilename(const char* filename);