Remove unused method
Bigfoot / Sonarqube (push) Skipped
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 5m45s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 5m50s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Successful in 6m14s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Successful in 6m11s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 6m25s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Successful in 7m28s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 6m17s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Successful in 7m21s
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 6m13s
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 6m8s
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Successful in 6m59s
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Successful in 6m57s
Bigfoot / Clang Format Checks (push) Failing after 8s
Bigfoot / Sonarqube (push) Skipped
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 5m45s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 5m50s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Successful in 6m14s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Successful in 6m11s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 6m25s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Successful in 7m28s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 6m17s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Successful in 7m21s
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 6m13s
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 6m8s
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Successful in 6m59s
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Successful in 6m57s
Bigfoot / Clang Format Checks (push) Failing after 8s
This commit is contained in:
@@ -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<class ASSET>
|
||||
[[nodiscard]]
|
||||
AssetContainer<ASSET>* GetAssetContainer()
|
||||
{
|
||||
static const AssetTypeID typeID = ASSET::GetTypeID();
|
||||
return static_cast<AssetContainer<ASSET>*>(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<class ASSET>
|
||||
[[nodiscard]]
|
||||
const AssetContainer<ASSET>* GetAssetContainer() const
|
||||
{
|
||||
static const AssetTypeID typeID = ASSET::GetTypeID();
|
||||
return static_cast<const AssetContainer<ASSET>*>(GetAssetContainer(typeID));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the AssetContainer for a given AssetType
|
||||
*
|
||||
|
||||
@@ -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<AssetA>(), &m_containerA);
|
||||
EXPECT_EQ(m_library.GetAssetContainer(GetAssetTypeID<AssetA>()), &m_containerA);
|
||||
EXPECT_EQ(m_library.GetAssetContainer<AssetB>(), &m_containerB);
|
||||
EXPECT_EQ(m_library.GetAssetContainer(GetAssetTypeID<AssetB>()), &m_containerB);
|
||||
EXPECT_EQ(m_library.GetAssetContainer<AssetC>(), &m_containerC);
|
||||
EXPECT_EQ(m_library.GetAssetContainer(GetAssetTypeID<AssetC>()), &m_containerC);
|
||||
|
||||
EXPECT_EQ(std::as_const(m_library).GetAssetContainer<AssetA>(), &m_containerA);
|
||||
EXPECT_EQ(std::as_const(m_library).GetAssetContainer(GetAssetTypeID<AssetA>()), &m_containerA);
|
||||
EXPECT_EQ(std::as_const(m_library).GetAssetContainer<AssetB>(), &m_containerB);
|
||||
EXPECT_EQ(std::as_const(m_library).GetAssetContainer(GetAssetTypeID<AssetB>()), &m_containerB);
|
||||
EXPECT_EQ(std::as_const(m_library).GetAssetContainer<AssetC>(), &m_containerC);
|
||||
EXPECT_EQ(std::as_const(m_library).GetAssetContainer(GetAssetTypeID<AssetC>()), &m_containerC);
|
||||
}
|
||||
|
||||
@@ -72,10 +66,7 @@ TEST_F(AssetLibraryFixture, GetAssetContainer_ShouldReturnNullptrIfTheContainerD
|
||||
{
|
||||
std::ignore = m_library.Insert(&m_containerB);
|
||||
|
||||
EXPECT_EQ(m_library.GetAssetContainer<AssetA>(), nullptr);
|
||||
EXPECT_EQ(m_library.GetAssetContainer(GetAssetTypeID<AssetA>()), nullptr);
|
||||
|
||||
EXPECT_EQ(std::as_const(m_library).GetAssetContainer<AssetA>(), nullptr);
|
||||
EXPECT_EQ(std::as_const(m_library).GetAssetContainer(GetAssetTypeID<AssetA>()), nullptr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user