2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-11-23 21:22:07 +00:00

chore: addEmptyFootstepTableAsset does not need to return something

This commit is contained in:
Jan Laupetin
2025-11-09 23:10:56 +01:00
parent 98292abb09
commit a55146a9de
2 changed files with 4 additions and 6 deletions

View File

@@ -11,18 +11,16 @@ using namespace T6;
namespace BSP namespace BSP
{ {
FootstepTableDef* BSPLinker::addEmptyFootstepTableAsset(const std::string& assetName) const void BSPLinker::addEmptyFootstepTableAsset(const std::string& assetName) const
{ {
if (assetName.length() == 0) if (assetName.empty())
return nullptr; return;
auto* footstepTable = m_memory.Alloc<FootstepTableDef>(); auto* footstepTable = m_memory.Alloc<FootstepTableDef>();
footstepTable->name = m_memory.Dup(assetName.c_str()); footstepTable->name = m_memory.Dup(assetName.c_str());
memset(footstepTable->sndAliasTable, 0, sizeof(footstepTable->sndAliasTable)); memset(footstepTable->sndAliasTable, 0, sizeof(footstepTable->sndAliasTable));
m_context.AddAsset<AssetFootstepTable>(assetName, footstepTable); m_context.AddAsset<AssetFootstepTable>(assetName, footstepTable);
return footstepTable;
} }
bool BSPLinker::addDefaultRequiredAssets(const BSPData& bsp) const bool BSPLinker::addDefaultRequiredAssets(const BSPData& bsp) const

View File

@@ -15,7 +15,7 @@ namespace BSP
[[nodiscard]] bool linkBSP(const BSPData& bsp) const; [[nodiscard]] bool linkBSP(const BSPData& bsp) const;
private: private:
T6::FootstepTableDef* addEmptyFootstepTableAsset(const std::string& assetName) const; void addEmptyFootstepTableAsset(const std::string& assetName) const;
[[nodiscard]] bool addDefaultRequiredAssets(const BSPData& bsp) const; [[nodiscard]] bool addDefaultRequiredAssets(const BSPData& bsp) const;
MemoryManager& m_memory; MemoryManager& m_memory;