Skip to content

Commit 8745a35

Browse files
committed
[asset-system] Pass asset names not StringID's to the AssetShelve 'store' method.
1 parent 92c7ab8 commit 8745a35

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

source/code/systems/asset_system/private/asset_shelve.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ namespace ice
6161
}
6262

6363
auto AssetShelve::store(
64-
ice::StringID_Arg name,
64+
ice::String name,
6565
ice::ResourceHandle const& resource
6666
) noexcept -> ice::AssetEntry*
6767
{
@@ -72,7 +72,7 @@ namespace ice
7272
ice::u64 const name_hash = ice::hash(name);
7373
if constexpr (ice::AssetEntry::HoldsDebugData)
7474
{
75-
ice::HeapString<> asset_name{ _allocator, ice::stringid_hint(name) };
75+
ice::HeapString<> asset_name{ _allocator, name };
7676

7777
ice::hashmap::set(
7878
_asset_resources,
@@ -96,7 +96,7 @@ namespace ice
9696
}
9797

9898
auto AssetShelve::store(
99-
ice::StringID_Arg name,
99+
ice::String name,
100100
ice::AssetDataBinding const& data_binding
101101
) noexcept -> ice::AssetEntry*
102102
{
@@ -111,7 +111,7 @@ namespace ice
111111
ice::u64 const name_hash = ice::hash(name);
112112
if constexpr (ice::AssetEntry::HoldsDebugData)
113113
{
114-
ice::HeapString<> asset_name{ _allocator, ice::stringid_hint(name) };
114+
ice::HeapString<> asset_name{ _allocator, name };
115115

116116
ice::hashmap::set(
117117
_asset_resources,

source/code/systems/asset_system/private/asset_shelve.hxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ namespace ice
3636
) const noexcept -> ice::AssetEntry const*;
3737

3838
auto store(
39-
ice::StringID_Arg name,
39+
ice::String name,
4040
ice::ResourceHandle const& resource_handle
4141
) noexcept -> ice::AssetEntry*;
4242

4343
auto store(
44-
ice::StringID_Arg name,
44+
ice::String name,
4545
ice::AssetDataBinding const& data_binding
4646
) noexcept -> ice::AssetEntry*;
4747

source/code/systems/asset_system/private/asset_storage.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ namespace ice
322322
if (resource_handle.valid())
323323
{
324324
// Create a new asset entry if the handle exists
325-
entry = shelve->store(ice::stringid(name), resource_handle);
325+
entry = shelve->store(name, resource_handle);
326326
ICE_ASSERT_CORE(entry != nullptr);
327327

328328
//ice::u32 const prev_count = entry->_refcount.fetch_add(1, std::memory_order_relaxed);
@@ -379,7 +379,7 @@ namespace ice
379379
else if (shelve != nullptr)
380380
{
381381
// Create a new asset entry if the handle exists
382-
entry = shelve->store(ice::stringid(name), data_binding);
382+
entry = shelve->store(name, data_binding);
383383
ICE_ASSERT_CORE(entry != nullptr);
384384

385385
//ice::u32 const prev_count = entry->_refcount.fetch_add(1, std::memory_order_relaxed);

0 commit comments

Comments
 (0)