format
Bigfoot / Sonarqube (push) Skipped
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: OFF) (push) Failing after 10m27s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Successful in 6m3s
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: OFF) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: ON) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: OFF) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: ON) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Canceled after 0s
Bigfoot / Clang Format Checks (push) Canceled after 0s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Canceled after 2m34s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 5m30s
Bigfoot / Sonarqube (push) Skipped
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: OFF) (push) Failing after 10m27s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Successful in 6m3s
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: OFF) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: ON) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: OFF) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: ON) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Canceled after 0s
Bigfoot / Clang Format Checks (push) Canceled after 0s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Canceled after 2m34s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 5m30s
This commit is contained in:
@@ -121,6 +121,7 @@ class AssetContainerBase
|
||||
{
|
||||
using SlotMap = StableSlotMap<ContainerHandle>;
|
||||
using SlotMapKey = SlotMap::SlotMapKey;
|
||||
|
||||
public:
|
||||
virtual ~AssetContainerBase() = default;
|
||||
|
||||
@@ -262,6 +263,7 @@ class AssetContainer: public AssetContainerBase
|
||||
{
|
||||
using SlotMap = StableSlotMap<ASSET>;
|
||||
using SlotMapKey = SlotMap::SlotMapKey;
|
||||
|
||||
public:
|
||||
AssetContainer() = default;
|
||||
|
||||
|
||||
@@ -10,18 +10,9 @@
|
||||
|
||||
#include <EASTL/array.h>
|
||||
#include <EASTL/bitset.h>
|
||||
#include <EASTL/iterator.h>
|
||||
#include <EASTL/numeric.h>
|
||||
#include <EASTL/unique_ptr.h>
|
||||
#include <EASTL/vector.h>
|
||||
#include <EASTL/numeric.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <new>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
@@ -150,7 +141,8 @@ class DenseSlotMap
|
||||
const std::size_t indexToRecyclingKey = m_freeListHead;
|
||||
|
||||
m_freeListHead = m_keys[indexToRecyclingKey].GetIndex();
|
||||
m_keys[indexToRecyclingKey] = SlotMapKey {m_keys[indexToRecyclingKey].GetVersion(), static_cast<SlotMapKey::IndexType>(indexToInsertedData)};
|
||||
m_keys[indexToRecyclingKey] = SlotMapKey {m_keys[indexToRecyclingKey].GetVersion(),
|
||||
static_cast<SlotMapKey::IndexType>(indexToInsertedData)};
|
||||
m_dataToKey.emplace_back(indexToRecyclingKey);
|
||||
|
||||
return SlotMapKey {m_keys[indexToRecyclingKey].GetVersion(),
|
||||
@@ -305,7 +297,8 @@ class DenseSlotMap
|
||||
|
||||
void RecycleKey(const SlotMapKey p_key)
|
||||
{
|
||||
const typename SlotMapKey::VersionType nextVersion = static_cast<SlotMapKey::VersionType>(p_key.GetVersion() + 1);
|
||||
const typename SlotMapKey::VersionType nextVersion = static_cast<SlotMapKey::VersionType>(p_key.GetVersion() +
|
||||
1);
|
||||
|
||||
if (nextVersion == SlotMapKey::INVALID_VERSION)
|
||||
{
|
||||
@@ -345,7 +338,6 @@ class StableSlotMap
|
||||
alignas(T) std::byte m_bytes[sizeof(T)];
|
||||
};
|
||||
|
||||
|
||||
struct Page
|
||||
{
|
||||
Page() = default;
|
||||
@@ -395,8 +387,9 @@ class StableSlotMap
|
||||
{
|
||||
private:
|
||||
using PagesVector = eastl::vector<eastl::unique_ptr<Page>>;
|
||||
using PageIterator =
|
||||
std::conditional_t<std::is_const_v<VALUE_TYPE>, typename PagesVector::const_iterator, typename PagesVector::iterator>;
|
||||
using PageIterator = std::conditional_t<std::is_const_v<VALUE_TYPE>,
|
||||
typename PagesVector::const_iterator,
|
||||
typename PagesVector::iterator>;
|
||||
using MapType = std::conditional_t<std::is_const_v<VALUE_TYPE>, const StableSlotMap, StableSlotMap>;
|
||||
using PageType = std::conditional_t<std::is_const_v<VALUE_TYPE>, const Page, Page>;
|
||||
|
||||
@@ -585,12 +578,12 @@ class StableSlotMap
|
||||
std::size_t Size() const
|
||||
{
|
||||
return eastl::accumulate(m_pages.begin(),
|
||||
m_pages.end(),
|
||||
0,
|
||||
[](const std::size_t p_value, const eastl::unique_ptr<Page>& p_page)
|
||||
{
|
||||
return p_value + p_page->Size();
|
||||
});
|
||||
m_pages.end(),
|
||||
0,
|
||||
[](const std::size_t p_value, const eastl::unique_ptr<Page>& p_page)
|
||||
{
|
||||
return p_value + p_page->Size();
|
||||
});
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
|
||||
Reference in New Issue
Block a user