From 17ab916b11cdb9c1a4d0559d9251109b9f5bc9bd Mon Sep 17 00:00:00 2001 From: Romain BOULLARD Date: Tue, 18 Aug 2026 15:23:49 +0200 Subject: [PATCH] Remove unused method --- .../Include/Engine/Asset/AssetLibrary.hpp | 28 ------------------- Bigfoot/Tests/Engine/Asset/AssetLibrary.cpp | 9 ------ 2 files changed, 37 deletions(-) diff --git a/Bigfoot/Sources/Engine/Include/Engine/Asset/AssetLibrary.hpp b/Bigfoot/Sources/Engine/Include/Engine/Asset/AssetLibrary.hpp index 627b931..1a2ed7f 100644 --- a/Bigfoot/Sources/Engine/Include/Engine/Asset/AssetLibrary.hpp +++ b/Bigfoot/Sources/Engine/Include/Engine/Asset/AssetLibrary.hpp @@ -45,34 +45,6 @@ class AssetLibrary return inserted.second; } - /** - * Get the AssetContainer for a given Asset type - * - * \tparam ASSET The Asset type - * \return The AssetContainer for the Asset type. Nullptr if not found - */ - template - [[nodiscard]] - AssetContainer* GetAssetContainer() - { - static const AssetTypeID typeID = ASSET::GetTypeID(); - return static_cast*>(GetAssetContainer(typeID)); - } - - /** - * Get the AssetContainer for a given Asset type - * - * \tparam ASSET The Asset type - * \return The AssetContainer for the Asset type. Nullptr if not found - */ - template - [[nodiscard]] - const AssetContainer* GetAssetContainer() const - { - static const AssetTypeID typeID = ASSET::GetTypeID(); - return static_cast*>(GetAssetContainer(typeID)); - } - /** * Get the AssetContainer for a given AssetType * diff --git a/Bigfoot/Tests/Engine/Asset/AssetLibrary.cpp b/Bigfoot/Tests/Engine/Asset/AssetLibrary.cpp index faeefeb..46f5d31 100644 --- a/Bigfoot/Tests/Engine/Asset/AssetLibrary.cpp +++ b/Bigfoot/Tests/Engine/Asset/AssetLibrary.cpp @@ -51,18 +51,12 @@ TEST_F(AssetLibraryFixture, GetAssetContainer_ShouldReturnTheAssetContainerIfAva std::ignore = m_library.Insert(&m_containerB); std::ignore = m_library.Insert(&m_containerC); - EXPECT_EQ(m_library.GetAssetContainer(), &m_containerA); EXPECT_EQ(m_library.GetAssetContainer(GetAssetTypeID()), &m_containerA); - EXPECT_EQ(m_library.GetAssetContainer(), &m_containerB); EXPECT_EQ(m_library.GetAssetContainer(GetAssetTypeID()), &m_containerB); - EXPECT_EQ(m_library.GetAssetContainer(), &m_containerC); EXPECT_EQ(m_library.GetAssetContainer(GetAssetTypeID()), &m_containerC); - EXPECT_EQ(std::as_const(m_library).GetAssetContainer(), &m_containerA); EXPECT_EQ(std::as_const(m_library).GetAssetContainer(GetAssetTypeID()), &m_containerA); - EXPECT_EQ(std::as_const(m_library).GetAssetContainer(), &m_containerB); EXPECT_EQ(std::as_const(m_library).GetAssetContainer(GetAssetTypeID()), &m_containerB); - EXPECT_EQ(std::as_const(m_library).GetAssetContainer(), &m_containerC); EXPECT_EQ(std::as_const(m_library).GetAssetContainer(GetAssetTypeID()), &m_containerC); } @@ -72,10 +66,7 @@ TEST_F(AssetLibraryFixture, GetAssetContainer_ShouldReturnNullptrIfTheContainerD { std::ignore = m_library.Insert(&m_containerB); - EXPECT_EQ(m_library.GetAssetContainer(), nullptr); EXPECT_EQ(m_library.GetAssetContainer(GetAssetTypeID()), nullptr); - - EXPECT_EQ(std::as_const(m_library).GetAssetContainer(), nullptr); EXPECT_EQ(std::as_const(m_library).GetAssetContainer(GetAssetTypeID()), nullptr); }