diff --git a/Source/Core/VideoCommon/Assets/CustomAsset.cpp b/Source/Core/VideoCommon/Assets/CustomAsset.cpp index bc11fd81d8..7e2e817d15 100644 --- a/Source/Core/VideoCommon/Assets/CustomAsset.cpp +++ b/Source/Core/VideoCommon/Assets/CustomAsset.cpp @@ -3,6 +3,8 @@ #include "VideoCommon/Assets/CustomAsset.h" +#include + namespace VideoCommon { CustomAsset::CustomAsset(std::shared_ptr library, @@ -33,7 +35,7 @@ std::size_t CustomAsset::Unload() { std::lock_guard lk(m_info_lock); UnloadImpl(); - return m_bytes_loaded.exchange(0); + return std::exchange(m_bytes_loaded, 0); } CustomAsset::TimeType CustomAsset::GetLastLoadedTime() const @@ -51,9 +53,4 @@ const CustomAssetLibrary::AssetID& CustomAsset::GetAssetId() const return m_asset_id; } -std::size_t CustomAsset::GetByteSizeInMemory() const -{ - return m_bytes_loaded; -} - } // namespace VideoCommon diff --git a/Source/Core/VideoCommon/Assets/CustomAsset.h b/Source/Core/VideoCommon/Assets/CustomAsset.h index e86f1eab77..cdf5f14e70 100644 --- a/Source/Core/VideoCommon/Assets/CustomAsset.h +++ b/Source/Core/VideoCommon/Assets/CustomAsset.h @@ -46,10 +46,6 @@ public: // as an index std::size_t GetHandle() const; - // A rough estimate of how much space this asset - // will take in memroy - std::size_t GetByteSizeInMemory() const; - protected: const std::shared_ptr m_owning_library; @@ -60,7 +56,7 @@ private: std::size_t m_handle; mutable std::mutex m_info_lock; - std::atomic m_bytes_loaded = 0; + std::size_t m_bytes_loaded = 0; std::atomic m_last_loaded_time = {}; };