From b85902ccb5af8d46aa032f4e0502372dcb4716c0 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 25 Nov 2023 17:58:54 -0500 Subject: [PATCH 1/2] CustomAssetLibrary: Add virtual destructor This is used as a base pointer inside CustomPipelineAction, so this should probably really have a virtual destructor to ensure derived objects are torn down properly. --- Source/Core/VideoCommon/Assets/CustomAssetLibrary.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Core/VideoCommon/Assets/CustomAssetLibrary.h b/Source/Core/VideoCommon/Assets/CustomAssetLibrary.h index 17b16f9fb9..282fad7473 100644 --- a/Source/Core/VideoCommon/Assets/CustomAssetLibrary.h +++ b/Source/Core/VideoCommon/Assets/CustomAssetLibrary.h @@ -31,6 +31,8 @@ public: CustomAssetLibrary::TimeType m_load_time = {}; }; + virtual ~CustomAssetLibrary() = default; + // Loads a texture, if there are no levels, bytes loaded will be empty virtual LoadInfo LoadTexture(const AssetID& asset_id, TextureData* data) = 0; From 04011373f3653101709ce904ac59dd70e9cb2ff2 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 25 Nov 2023 18:01:42 -0500 Subject: [PATCH 2/2] CustomAssetLibrary: Remove unnecessary qualifier in LoadInfo The type is already in visible scope, so we don't need the rather length qualifier. --- Source/Core/VideoCommon/Assets/CustomAssetLibrary.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/Assets/CustomAssetLibrary.h b/Source/Core/VideoCommon/Assets/CustomAssetLibrary.h index 282fad7473..78cea9a3e9 100644 --- a/Source/Core/VideoCommon/Assets/CustomAssetLibrary.h +++ b/Source/Core/VideoCommon/Assets/CustomAssetLibrary.h @@ -28,7 +28,7 @@ public: struct LoadInfo { std::size_t m_bytes_loaded = 0; - CustomAssetLibrary::TimeType m_load_time = {}; + TimeType m_load_time = {}; }; virtual ~CustomAssetLibrary() = default;