VideoCommon: remove 'GetByteSizeInMemory()' from custom asset, it is not needed anymore

This commit is contained in:
iwubcode
2025-06-06 20:43:31 -05:00
parent 774a84a953
commit c3d3b81533
2 changed files with 4 additions and 11 deletions

View File

@ -3,6 +3,8 @@
#include "VideoCommon/Assets/CustomAsset.h"
#include <utility>
namespace VideoCommon
{
CustomAsset::CustomAsset(std::shared_ptr<CustomAssetLibrary> 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

View File

@ -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<CustomAssetLibrary> m_owning_library;
@ -60,7 +56,7 @@ private:
std::size_t m_handle;
mutable std::mutex m_info_lock;
std::atomic<std::size_t> m_bytes_loaded = 0;
std::size_t m_bytes_loaded = 0;
std::atomic<TimeType> m_last_loaded_time = {};
};