Skip to content

Commit 763f9fb

Browse files
committed
remove getItemList() proxy function and keep resources as inline static const list directly in the CArchive.h
1 parent 9cb464f commit 763f9fb

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/nbl/builtin/template/CArchive.h.in

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace @_NAMESPACE_@
1515
{
1616
public:
1717
inline CArchive(nbl::system::logger_opt_smart_ptr&& logger)
18-
: nbl::system::CFileArchive(nbl::system::path(pathPrefix.data()),std::move(logger), getItemList()) {}
18+
: nbl::system::CFileArchive(nbl::system::path(pathPrefix.data()),std::move(logger), resources) {}
1919

2020
protected:
2121
file_buffer_t getFileBuffer(const nbl::system::IFileArchive::SListEntry* item) override
@@ -24,15 +24,10 @@ namespace @_NAMESPACE_@
2424
return { const_cast<uint8_t*>(found.first), found.second, nullptr };
2525
}
2626

27-
nbl::core::vector<nbl::system::IFileArchive::SListEntry> getItemList()
27+
inline static const nbl::core::vector<nbl::system::IFileArchive::SListEntry> resources
2828
{
29-
static nbl::core::vector<nbl::system::IFileArchive::SListEntry> resources
30-
{
3129
@_RESOURCES_INIT_LIST_@
32-
};
33-
34-
return resources;
35-
}
30+
};
3631
};
3732
}
3833

0 commit comments

Comments
 (0)