Rule of 0/3/5
Bigfoot / Sonarqube (push) Skipped
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: game) (push) Failing after 14m21s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: ON, Variant: game) (push) Failing after 13m46s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: toolmode) (push) Failing after 14m11s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: ON, Variant: toolmode) (push) Failing after 13m51s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: game) (push) Failing after 14m45s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: game) (push) Failing after 14m18s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: toolmode) (push) Failing after 15m3s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: toolmode) (push) Failing after 14m28s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: game) (push) Failing after 15m30s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: ON, Variant: game) (push) Failing after 15m16s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: toolmode) (push) Failing after 15m43s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: ON, Variant: toolmode) (push) Failing after 15m20s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: game) (push) Failing after 17m25s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: game) (push) Failing after 16m42s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: toolmode) (push) Failing after 17m18s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: game) (push) Failing after 15m3s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: toolmode) (push) Failing after 16m39s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: ON, Variant: game) (push) Failing after 14m43s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: toolmode) (push) Failing after 15m15s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: ON, Variant: toolmode) (push) Failing after 14m55s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: game) (push) Failing after 16m6s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: game) (push) Failing after 15m54s
Bigfoot / Clang Format Checks (push) Successful in 10s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: toolmode) (push) Failing after 16m4s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: toolmode) (push) Failing after 15m47s

This commit is contained in:
2026-08-24 00:49:01 +02:00
parent 081e23360f
commit 4b07aa7fa2
15 changed files with 29 additions and 170 deletions
@@ -26,10 +26,10 @@ class AssetBase
protected: protected:
AssetBase() = default; AssetBase() = default;
AssetBase(const AssetBase& p_asset) = default; AssetBase(const AssetBase& p_asset) = delete;
AssetBase(AssetBase&& p_asset) = default; AssetBase(AssetBase&& p_asset) = default;
AssetBase& operator=(const AssetBase& p_asset) = default; AssetBase& operator=(const AssetBase& p_asset) = delete;
AssetBase& operator=(AssetBase&& p_asset) = default; AssetBase& operator=(AssetBase&& p_asset) = default;
}; };
@@ -52,11 +52,6 @@ class Asset: public AssetBase
m_header.type_name = eastl::string {GetTypeName()}; m_header.type_name = eastl::string {GetTypeName()};
} }
Asset(const Asset& p_asset) = default;
Asset(Asset&& p_asset) = default;
~Asset() = default;
/** /**
* Get the header of the asset * Get the header of the asset
* *
@@ -181,9 +176,6 @@ class Asset: public AssetBase
return FLAT_ASSET::GetFullyQualifiedName(); return FLAT_ASSET::GetFullyQualifiedName();
} }
Asset& operator=(const Asset& p_asset) = default;
Asset& operator=(Asset&& p_asset) = default;
private: private:
/** /**
* The asset * The asset
@@ -24,13 +24,6 @@ namespace Bigfoot
class ContainerHandle class ContainerHandle
{ {
public: public:
ContainerHandle() = default;
ContainerHandle(const ContainerHandle& p_handle) = default;
ContainerHandle(ContainerHandle&& p_handle) = default;
~ContainerHandle() = default;
/* /*
* Get the HardRef count * Get the HardRef count
* *
@@ -121,9 +114,6 @@ class ContainerHandle
m_asset = p_asset; m_asset = p_asset;
} }
ContainerHandle& operator=(const ContainerHandle& p_handle) = default;
ContainerHandle& operator=(ContainerHandle&& p_handle) = default;
private: private:
/* /*
* The HardRef count * The HardRef count
@@ -191,7 +181,6 @@ class AssetContainerBase
} }
} }
AssetContainerBase& operator=(const AssetContainerBase& p_container) = delete;
AssetContainerBase& operator=(AssetContainerBase&& p_container) = delete; AssetContainerBase& operator=(AssetContainerBase&& p_container) = delete;
protected: protected:
@@ -210,7 +199,6 @@ class AssetContainerBase
AssetContainerBase() = default; AssetContainerBase() = default;
AssetContainerBase(const AssetContainerBase& p_container) = delete;
AssetContainerBase(AssetContainerBase&& p_container) = delete; AssetContainerBase(AssetContainerBase&& p_container) = delete;
/* /*
@@ -292,13 +280,6 @@ class AssetContainer: public AssetContainerBase
using SlotMapKey = SlotMap::SlotMapKey; using SlotMapKey = SlotMap::SlotMapKey;
public: public:
AssetContainer() = default;
AssetContainer(const AssetContainer& p_container) = delete;
AssetContainer(AssetContainer&& p_container) = delete;
~AssetContainer() = default;
/* /*
* Inserts an Asset to the AssetContainer * Inserts an Asset to the AssetContainer
* *
@@ -369,9 +350,6 @@ class AssetContainer: public AssetContainerBase
AssetContainerBase::Remove(p_uuid); AssetContainerBase::Remove(p_uuid);
} }
AssetContainer& operator=(const AssetContainer& p_container) = delete;
AssetContainer& operator=(AssetContainer&& p_container) = delete;
private: private:
/* /*
* The assets * The assets
@@ -22,8 +22,6 @@ class AssetLibrary
AssetLibrary(const AssetLibrary& p_library) = default; AssetLibrary(const AssetLibrary& p_library) = default;
AssetLibrary(AssetLibrary&& p_library) = delete; AssetLibrary(AssetLibrary&& p_library) = delete;
~AssetLibrary() = default;
/** /**
* Insert an AssetContainer pointer to the library * Insert an AssetContainer pointer to the library
* *
@@ -199,14 +199,6 @@ class BigFile: public DataAccessor
*/ */
Column(const Request& p_request, const std::uint32_t p_index); Column(const Request& p_request, const std::uint32_t p_index);
Column(const Column& p_column) = default;
Column(Column&& p_column) = default;
~Column() = default;
Column& operator=(const Column& p_column) = default;
Column& operator=(Column&& p_column) = default;
/* /*
* Get value as a int32 * Get value as a int32
* *
@@ -24,9 +24,6 @@ class File
*/ */
File(const eastl::string_view p_path); File(const eastl::string_view p_path);
File(const File& p_path) = default;
File(File&& p_path) = default;
/** /**
* Check if the file is relative to the current executable * Check if the file is relative to the current executable
* *
@@ -75,11 +72,6 @@ class File
[[nodiscard]] [[nodiscard]]
File ToAbsolute() const; File ToAbsolute() const;
~File() = default;
File& operator=(const File& p_path) = default;
File& operator=(File&& p_path) = default;
private: private:
/** /**
* Constructor * Constructor
@@ -17,9 +17,6 @@ class Time
public: public:
Time(const std::uint64_t p_epoch); Time(const std::uint64_t p_epoch);
Time(const Time& p_time) = default;
Time(Time&& p_time) = default;
[[nodiscard]] [[nodiscard]]
std::uint32_t GetYear() const; std::uint32_t GetYear() const;
@@ -44,11 +41,6 @@ class Time
[[nodiscard]] [[nodiscard]]
std::uint64_t GetEpoch() const; std::uint64_t GetEpoch() const;
~Time() = default;
Time& operator=(const Time& p_time) = default;
Time& operator=(Time&& p_time) = default;
[[nodiscard]] [[nodiscard]]
bool operator==(const Time& p_other) const bool operator==(const Time& p_other) const
{ {
@@ -36,9 +36,6 @@ class UUID
*/ */
explicit UUID(const std::span<const std::byte, UUID_BYTE_SIZE> p_raw); explicit UUID(const std::span<const std::byte, UUID_BYTE_SIZE> p_raw);
UUID(const UUID& p_uuid) = default;
UUID(UUID&& p_uuid) noexcept = default;
/** /**
* Gets the raw bytes of a UUID * Gets the raw bytes of a UUID
* *
@@ -55,13 +52,8 @@ class UUID
[[nodiscard]] [[nodiscard]]
std::string ToString() const; std::string ToString() const;
~UUID() = default;
operator bool() const; operator bool() const;
UUID& operator=(const UUID& p_uuid) = default;
UUID& operator=(UUID&& p_uuid) noexcept = default;
[[nodiscard]] [[nodiscard]]
bool operator==(const UUID& p_uuid) const; bool operator==(const UUID& p_uuid) const;
[[nodiscard]] [[nodiscard]]
@@ -61,11 +61,6 @@ class SlotMapKey
{ {
} }
constexpr SlotMapKey(const SlotMapKey& p_slotKey) = default;
constexpr SlotMapKey(SlotMapKey&& p_slotKey) = default;
constexpr ~SlotMapKey() = default;
/** /**
* Check if the key is valid (Version different than INVALID_VERSION) * Check if the key is valid (Version different than INVALID_VERSION)
* *
@@ -99,9 +94,6 @@ class SlotMapKey
return static_cast<IndexType>(m_key & INDEX_MASK); return static_cast<IndexType>(m_key & INDEX_MASK);
} }
constexpr SlotMapKey& operator=(const SlotMapKey& p_slotKey) = default;
constexpr SlotMapKey& operator=(SlotMapKey&& p_slotKey) = default;
[[nodiscard]] [[nodiscard]]
constexpr bool operator==(const SlotMapKey& p_other) const = default; constexpr bool operator==(const SlotMapKey& p_other) const = default;
@@ -128,13 +120,6 @@ class DenseSlotMap
using reverse_iterator = typename eastl::vector<T>::reverse_iterator; using reverse_iterator = typename eastl::vector<T>::reverse_iterator;
using const_reverse_iterator = typename eastl::vector<T>::const_reverse_iterator; using const_reverse_iterator = typename eastl::vector<T>::const_reverse_iterator;
DenseSlotMap() = default;
DenseSlotMap(const DenseSlotMap&) = default;
DenseSlotMap(DenseSlotMap&&) = default;
~DenseSlotMap() = default;
/** /**
* Check if the map has the key * Check if the map has the key
* *
@@ -372,9 +357,6 @@ class DenseSlotMap
return m_data.crend(); return m_data.crend();
} }
DenseSlotMap& operator=(const DenseSlotMap&) = default;
DenseSlotMap& operator=(DenseSlotMap&&) = default;
private: private:
/** /**
* Does the map have free slots (ie: indices that can be recyled) * Does the map have free slots (ie: indices that can be recyled)
@@ -702,13 +684,6 @@ class StableSlotMap
using reverse_iterator = eastl::reverse_iterator<iterator>; using reverse_iterator = eastl::reverse_iterator<iterator>;
using const_reverse_iterator = eastl::reverse_iterator<const_iterator>; using const_reverse_iterator = eastl::reverse_iterator<const_iterator>;
StableSlotMap() = default;
StableSlotMap(const StableSlotMap& p_map) = default;
StableSlotMap(StableSlotMap&& p_map) = default;
~StableSlotMap() = default;
/** /**
* Check if the map has the key * Check if the map has the key
* *
@@ -968,9 +943,6 @@ class StableSlotMap
return rend(); return rend();
} }
StableSlotMap& operator=(const StableSlotMap& p_map) = default;
StableSlotMap& operator=(StableSlotMap&& p_map) = default;
private: private:
/** /**
* Does the map have free slots (ie: indices that can be recyled) * Does the map have free slots (ie: indices that can be recyled)
@@ -22,14 +22,6 @@ class TaggedType
{ {
} }
constexpr TaggedType(const TaggedType& p_taggedType) = default;
constexpr TaggedType(TaggedType&& p_taggedType) noexcept = default;
~TaggedType() = default;
constexpr TaggedType& operator=(const TaggedType& p_taggedType) = default;
constexpr TaggedType& operator=(TaggedType&& p_taggedType) noexcept = default;
constexpr TaggedType& operator=(const TYPE& p_value) constexpr TaggedType& operator=(const TYPE& p_value)
{ {
m_value = p_value; m_value = p_value;
@@ -42,11 +42,6 @@ class Version
{ {
} }
Version(const Version& p_version) = default;
Version(Version&& p_version) = default;
~Version() = default;
/** /**
* Get the major part of the version. * Get the major part of the version.
* *
@@ -105,9 +100,6 @@ class Version
[[nodiscard]] [[nodiscard]]
std::string ToString() const; std::string ToString() const;
constexpr Version& operator=(const Version& p_version) = default;
constexpr Version& operator=(Version&& p_version) = default;
[[nodiscard]] [[nodiscard]]
constexpr auto operator<=>(const Version& p_version) const = default; constexpr auto operator<=>(const Version& p_version) const = default;
+26 -29
View File
@@ -16,13 +16,17 @@ class ContainerHandleFixture: public ::testing::Test
protected: protected:
void SetUp() override void SetUp() override
{ {
std::ignore = m_containerA.Insert(m_asset); const auto key = m_containerA.Insert();
m_handle = m_containerA.AcquireContainerHandle(m_asset.GetHeader().uuid);
m_uuid = m_containerA.Get(key)->GetHeader().uuid;
m_handle = m_containerA.AcquireContainerHandle(m_uuid);
} }
AssetA m_asset;
AssetContainer<AssetA> m_containerA; AssetContainer<AssetA> m_containerA;
UUID m_uuid;
ContainerHandle* m_handle; ContainerHandle* m_handle;
}; };
@@ -37,7 +41,7 @@ TEST_F(ContainerHandleFixture, GetAsset_ShouldReturnTheAsset)
TEST_F(ContainerHandleFixture, GetAsset_ShouldReturnNullptrIfTheAssetHasBeenRemoved) TEST_F(ContainerHandleFixture, GetAsset_ShouldReturnNullptrIfTheAssetHasBeenRemoved)
{ {
m_containerA.Remove(m_asset.GetHeader().uuid); m_containerA.Remove(m_uuid);
EXPECT_EQ(m_handle->GetAsset(), nullptr); EXPECT_EQ(m_handle->GetAsset(), nullptr);
} }
@@ -93,37 +97,33 @@ class AssetContainerFixture: public ::testing::Test
TEST_F(AssetContainerFixture, Has_ShouldReturnTrueIfTheContainerHasTheAsset) TEST_F(AssetContainerFixture, Has_ShouldReturnTrueIfTheContainerHasTheAsset)
{ {
AssetA asset1; const auto key = m_containerA.Insert();
std::ignore = m_containerA.Insert(asset1); EXPECT_TRUE(m_containerA.Has(m_containerA.Get(key)->GetHeader().uuid));
EXPECT_TRUE(m_containerA.Has(asset1.GetHeader().uuid));
} }
/****************************************************************************************/ /****************************************************************************************/
TEST_F(AssetContainerFixture, Has_ShouldReturnFalseIfTheContainerDoesNotHaveTheAsset) TEST_F(AssetContainerFixture, Has_ShouldReturnFalseIfTheContainerDoesNotHaveTheAsset)
{ {
AssetA asset1; EXPECT_FALSE(m_containerA.Has(UUID {}));
EXPECT_FALSE(m_containerA.Has(asset1.GetHeader().uuid));
} }
/****************************************************************************************/ /****************************************************************************************/
TEST_F(AssetContainerFixture, AcquireHandle_ShouldReturnTheAssociatedContainerHandle) TEST_F(AssetContainerFixture, AcquireHandle_ShouldReturnTheAssociatedContainerHandle)
{ {
AssetA asset1; const auto key = m_containerA.Insert();
std::ignore = m_containerA.Insert(asset1);
const ContainerHandle* handle = m_containerA.AcquireContainerHandle(asset1.GetHeader().uuid); const ContainerHandle* handle = m_containerA.AcquireContainerHandle(m_containerA.Get(key)->GetHeader().uuid);
EXPECT_EQ(static_cast<const AssetA*>(handle->GetAsset())->GetHeader().uuid, asset1.GetHeader().uuid); EXPECT_EQ(static_cast<const AssetA*>(handle->GetAsset())->GetHeader().uuid,
m_containerA.Get(key)->GetHeader().uuid);
} }
/****************************************************************************************/ /****************************************************************************************/
TEST_F(AssetContainerFixture, AcquireHandle_ShouldCreateTheAssociatedContainerHandleIfItDoesNotExists) TEST_F(AssetContainerFixture, AcquireHandle_ShouldCreateTheAssociatedContainerHandleIfItDoesNotExists)
{ {
AssetA asset1; const ContainerHandle* handle = m_containerA.AcquireContainerHandle(UUID {});
const ContainerHandle* handle = m_containerA.AcquireContainerHandle(asset1.GetHeader().uuid);
EXPECT_EQ(handle->GetAsset(), nullptr); EXPECT_EQ(handle->GetAsset(), nullptr);
} }
@@ -131,8 +131,7 @@ TEST_F(AssetContainerFixture, AcquireHandle_ShouldCreateTheAssociatedContainerHa
TEST_F(AssetContainerFixture, Insert_ShouldReturnValidAndUniqueSlotKeyOnInsert) TEST_F(AssetContainerFixture, Insert_ShouldReturnValidAndUniqueSlotKeyOnInsert)
{ {
AssetA asset1; const SlotMapKey slotKey = m_containerA.Insert();
const SlotMapKey slotKey = m_containerA.Insert(asset1);
EXPECT_TRUE(slotKey.Valid()); EXPECT_TRUE(slotKey.Valid());
EXPECT_NE(slotKey, m_containerA.Insert()); EXPECT_NE(slotKey, m_containerA.Insert());
} }
@@ -141,20 +140,18 @@ TEST_F(AssetContainerFixture, Insert_ShouldReturnValidAndUniqueSlotKeyOnInsert)
TEST_F(AssetContainerFixture, Insert_ShouldReturnTheSameSlotKeyInCaseOfDuplicatedUUID) TEST_F(AssetContainerFixture, Insert_ShouldReturnTheSameSlotKeyInCaseOfDuplicatedUUID)
{ {
AssetA asset; const SlotMapKey slotKey = m_containerA.Insert();
const SlotMapKey slotKey = m_containerA.Insert(asset); EXPECT_EQ(slotKey, m_containerA.Insert());
EXPECT_EQ(slotKey, m_containerA.Insert(asset));
} }
/****************************************************************************************/ /****************************************************************************************/
TEST_F(AssetContainerFixture, Get_ShouldReturnTheAssetWithTheSlotKey) TEST_F(AssetContainerFixture, Get_ShouldReturnTheAssetWithTheSlotKey)
{ {
AssetA asset; const SlotMapKey slotKey = m_containerA.Insert();
const SlotMapKey slotKey = m_containerA.Insert(asset);
EXPECT_EQ(m_containerA.Get(slotKey)->GetHeader().uuid, asset.GetHeader().uuid); EXPECT_NE(m_containerA.Get(slotKey), nullptr);
EXPECT_EQ(std::as_const(m_containerA).Get(slotKey)->GetHeader().uuid, asset.GetHeader().uuid); EXPECT_NE(std::as_const(m_containerA).Get(slotKey), nullptr);
} }
/****************************************************************************************/ /****************************************************************************************/
@@ -169,12 +166,12 @@ TEST_F(AssetContainerFixture, Get_ShouldReturnNullptrIfSlotKeyNotInContainer)
TEST_F(AssetContainerFixture, Remove_ShouldRemoveTheAsset) TEST_F(AssetContainerFixture, Remove_ShouldRemoveTheAsset)
{ {
AssetA asset; const SlotMapKey slotKey = m_containerA.Insert();
const SlotMapKey slotKey = m_containerA.Insert(asset); const UUID uuid = m_containerA.Get(slotKey)->GetHeader().uuid;
m_containerA.Remove(asset.GetHeader().uuid); m_containerA.Remove(uuid);
EXPECT_EQ(m_containerA.Get(slotKey), nullptr); EXPECT_EQ(m_containerA.Get(slotKey), nullptr);
EXPECT_FALSE(m_containerA.Has(asset.GetHeader().uuid)); EXPECT_FALSE(m_containerA.Has(uuid));
} }
} // namespace Bigfoot } // namespace Bigfoot
+1 -1
View File
@@ -194,7 +194,7 @@ TEST_F(BigFileFixture, Has_ShouldReturnTrueIfTheAssetExists)
TEST_F(BigFileFixture, Has_ShouldReturnFalseIfTheAssetDoesNotExist) TEST_F(BigFileFixture, Has_ShouldReturnFalseIfTheAssetDoesNotExist)
{ {
EXPECT_FALSE(m_bigFile.Has(UUID{})); EXPECT_FALSE(m_bigFile.Has(UUID {}));
} }
#endif #endif
} // namespace Bigfoot } // namespace Bigfoot
@@ -19,16 +19,6 @@ struct AssetATraits
class AssetA: public Asset<AssetATraits> class AssetA: public Asset<AssetATraits>
{ {
public:
AssetA() = default;
AssetA(const AssetA& p_asset) = default;
AssetA(AssetA&& p_asset) = default;
~AssetA() = default;
AssetA& operator=(const AssetA& p_asset) = default;
AssetA& operator=(AssetA&& p_asset) = default;
}; };
} // namespace Bigfoot } // namespace Bigfoot
@@ -19,16 +19,6 @@ struct AssetBTraits
class AssetB: public Asset<AssetBTraits> class AssetB: public Asset<AssetBTraits>
{ {
public:
AssetB() = default;
AssetB(const AssetB& p_asset) = delete;
AssetB(AssetB&& p_asset) = default;
~AssetB() = default;
AssetB& operator=(const AssetB& p_asset) = delete;
AssetB& operator=(AssetB&& p_asset) = default;
}; };
} // namespace Bigfoot } // namespace Bigfoot
@@ -19,16 +19,6 @@ struct AssetCTraits
class AssetC: public Asset<AssetCTraits> class AssetC: public Asset<AssetCTraits>
{ {
public:
AssetC() = default;
AssetC(const AssetC& p_asset) = delete;
AssetC(AssetC&& p_asset) = default;
~AssetC() = default;
AssetC& operator=(const AssetC& p_asset) = delete;
AssetC& operator=(AssetC&& p_asset) = default;
}; };
} // namespace Bigfoot } // namespace Bigfoot