From e06480a8ab61e67813fb698a162aabc867a20d78 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 12 Dec 2023 20:33:41 -0500 Subject: [PATCH] Software/SWGfx: Default destructor in cpp file Fixes a build failure with clang 17. The destructor needs to be in the cpp file, since we have a forward declared std::unique_ptr type as part of the class. So technically the default inline destructor could invoke without seeing the full data type definition. --- Source/Core/VideoBackends/Software/SWGfx.cpp | 2 ++ Source/Core/VideoBackends/Software/SWGfx.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoBackends/Software/SWGfx.cpp b/Source/Core/VideoBackends/Software/SWGfx.cpp index 78d2d14d63..7b9196063d 100644 --- a/Source/Core/VideoBackends/Software/SWGfx.cpp +++ b/Source/Core/VideoBackends/Software/SWGfx.cpp @@ -22,6 +22,8 @@ SWGfx::SWGfx(std::unique_ptr window) : m_window(std::move(window)) { } +SWGfx::~SWGfx() = default; + bool SWGfx::IsHeadless() const { return m_window->IsHeadless(); diff --git a/Source/Core/VideoBackends/Software/SWGfx.h b/Source/Core/VideoBackends/Software/SWGfx.h index bd9604fe3c..415564a19d 100644 --- a/Source/Core/VideoBackends/Software/SWGfx.h +++ b/Source/Core/VideoBackends/Software/SWGfx.h @@ -12,7 +12,8 @@ namespace SW class SWGfx final : public AbstractGfx { public: - SWGfx(std::unique_ptr window); + explicit SWGfx(std::unique_ptr window); + ~SWGfx() override; bool IsHeadless() const override; virtual bool SupportsUtilityDrawing() const override;