Maintenance
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: OFF) (push) Failing after 5m37s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: ON) (push) Has been cancelled
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Has been cancelled
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Has been cancelled
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: OFF) (push) Has been cancelled
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: ON) (push) Has been cancelled
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Has been cancelled
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Has been cancelled
Bigfoot / Clang Format Checks (push) Has been cancelled
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Has been cancelled
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Has been cancelled
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: OFF) (push) Has been cancelled
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: ON) (push) Has been cancelled

This commit is contained in:
2026-05-16 17:10:17 +02:00
parent 87d59a00c1
commit 00b86fbd00
23 changed files with 174 additions and 213 deletions
@@ -62,7 +62,7 @@
HANDLER::Handle(location, p_message __VA_OPT__(, ) __VA_ARGS__); \
if (Bigfoot::Singleton<Bigfoot::Log>::HasInstance()) \
{ \
Bigfoot::Singleton<Bigfoot::Log>::Instance().Flush(); \
Bigfoot::Singleton<Bigfoot::Log>::GetInstance().Flush(); \
} \
BREAK; \
std::abort(); \
@@ -61,15 +61,15 @@ class SlotMap
constexpr bool Valid() const
{
return Version() != INVALID_VERSION;
return GetVersion() != INVALID_VERSION;
}
constexpr VersionType Version() const
constexpr VersionType GetVersion() const
{
return static_cast<VersionType>(m_key >> INDEX_BIT_COUNT);
}
constexpr IndexType Index() const
constexpr IndexType GetIndex() const
{
return static_cast<IndexType>(m_key & INDEX_MASK);
}
@@ -107,12 +107,12 @@ class SlotMap
{
const typename SlotKey::IndexType slotIndex = m_freeSlotHead;
m_freeSlotHead = m_slots[slotIndex].Index();
m_freeSlotHead = m_slots[slotIndex].GetIndex();
m_slots[slotIndex] = SlotKey {m_slots[slotIndex].Version(), dataIndex};
m_slots[slotIndex] = SlotKey {m_slots[slotIndex].GetVersion(), dataIndex};
m_dataToSlots.push_back(slotIndex);
return SlotKey {m_slots[slotIndex].Version(), slotIndex};
return SlotKey {m_slots[slotIndex].GetVersion(), slotIndex};
}
const typename SlotKey::IndexType slotIndex = static_cast<SlotKey::IndexType>(m_slots.size());
@@ -129,36 +129,36 @@ class SlotMap
return;
}
const typename SlotKey::IndexType dataIndex = m_slots[p_slotKey.Index()].Index();
const typename SlotKey::IndexType dataIndex = m_slots[p_slotKey.GetIndex()].GetIndex();
m_data.erase_unsorted(m_data.begin() + dataIndex);
m_dataToSlots.erase_unsorted(m_dataToSlots.begin() + dataIndex);
if (dataIndex < m_data.size())
{
m_slots[m_dataToSlots[dataIndex]] = SlotKey {m_slots[m_dataToSlots[dataIndex]].Version(), dataIndex};
m_slots[m_dataToSlots[dataIndex]] = SlotKey {m_slots[m_dataToSlots[dataIndex]].GetVersion(), dataIndex};
}
RecycleSlot(p_slotKey.Version() + 1, p_slotKey.Index());
RecycleSlot(p_slotKey.GetVersion() + 1, p_slotKey.GetIndex());
}
[[nodiscard]]
bool Has(const SlotKey p_slotKey) const
{
return p_slotKey.Valid() &&
(p_slotKey.Index() < m_slots.size() && p_slotKey.Version() == m_slots[p_slotKey.Index()].Version());
(p_slotKey.GetIndex() < m_slots.size() && p_slotKey.GetVersion() == m_slots[p_slotKey.GetIndex()].GetVersion());
}
[[nodiscard]]
TYPE* Get(const SlotKey p_slotKey)
{
return Has(p_slotKey) ? &m_data[m_slots[p_slotKey.Index()].Index()] : nullptr;
return Has(p_slotKey) ? &m_data[m_slots[p_slotKey.GetIndex()].GetIndex()] : nullptr;
}
[[nodiscard]]
const TYPE* Get(const SlotKey p_slotKey) const
{
return Has(p_slotKey) ? &m_data[m_slots[p_slotKey.Index()].Index()] : nullptr;
return Has(p_slotKey) ? &m_data[m_slots[p_slotKey.GetIndex()].GetIndex()] : nullptr;
}
void Reset()
@@ -173,7 +173,7 @@ class SlotMap
{
for (const typename eastl::vector<TYPE>::size_type slotIndex: m_dataToSlots)
{
RecycleSlot(m_slots[slotIndex].Version() + 1, static_cast<SlotKey::IndexType>(slotIndex));
RecycleSlot(m_slots[slotIndex].GetVersion() + 1, static_cast<SlotKey::IndexType>(slotIndex));
}
m_data.clear();
@@ -181,13 +181,13 @@ class SlotMap
}
[[nodiscard]]
eastl::vector<TYPE>::size_type Size() const
eastl::vector<TYPE>::size_type GetSize() const
{
return m_data.size();
}
[[nodiscard]]
eastl::vector<TYPE>::size_type Capacity() const
eastl::vector<TYPE>::size_type GetCapacity() const
{
return m_data.capacity();
}
@@ -13,13 +13,13 @@
#define BIGFOOT_LOG_DEBUG(loggerName, fmt, ...) \
do \
{ \
if (::quill::Logger* logger = ::Bigfoot::Singleton<::Bigfoot::Log>::Instance().GetLogger(loggerName)) \
if (::quill::Logger* logger = ::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().GetLogger(loggerName)) \
{ \
QUILL_LOG_DEBUG(logger, fmt __VA_OPT__(, ) __VA_ARGS__); \
} \
else \
{ \
QUILL_LOG_DEBUG(::Bigfoot::Singleton<::Bigfoot::Log>::Instance().RegisterLogger(loggerName), \
QUILL_LOG_DEBUG(::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().RegisterLogger(loggerName), \
fmt __VA_OPT__(, ) __VA_ARGS__); \
} \
} while (0)
@@ -27,13 +27,13 @@
#define BIGFOOT_LOG_TRACE(loggerName, fmt, ...) \
do \
{ \
if (::quill::Logger* logger = ::Bigfoot::Singleton<::Bigfoot::Log>::Instance().GetLogger(loggerName)) \
if (::quill::Logger* logger = ::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().GetLogger(loggerName)) \
{ \
QUILL_LOG_TRACE_L3(logger, fmt __VA_OPT__(, ) __VA_ARGS__); \
} \
else \
{ \
QUILL_LOG_TRACE_L3(::Bigfoot::Singleton<::Bigfoot::Log>::Instance().RegisterLogger(loggerName), \
QUILL_LOG_TRACE_L3(::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().RegisterLogger(loggerName), \
fmt __VA_OPT__(, ) __VA_ARGS__); \
} \
} while (0)
@@ -41,13 +41,13 @@
#define BIGFOOT_LOG_INFO(loggerName, fmt, ...) \
do \
{ \
if (::quill::Logger* logger = ::Bigfoot::Singleton<::Bigfoot::Log>::Instance().GetLogger(loggerName)) \
if (::quill::Logger* logger = ::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().GetLogger(loggerName)) \
{ \
QUILL_LOG_INFO(logger, fmt __VA_OPT__(, ) __VA_ARGS__); \
} \
else \
{ \
QUILL_LOG_INFO(::Bigfoot::Singleton<::Bigfoot::Log>::Instance().RegisterLogger(loggerName), \
QUILL_LOG_INFO(::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().RegisterLogger(loggerName), \
fmt __VA_OPT__(, ) __VA_ARGS__); \
} \
} while (0)
@@ -55,13 +55,13 @@
#define BIGFOOT_LOG_WARN(loggerName, fmt, ...) \
do \
{ \
if (::quill::Logger* logger = ::Bigfoot::Singleton<::Bigfoot::Log>::Instance().GetLogger(loggerName)) \
if (::quill::Logger* logger = ::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().GetLogger(loggerName)) \
{ \
QUILL_LOG_WARNING(logger, fmt __VA_OPT__(, ) __VA_ARGS__); \
} \
else \
{ \
QUILL_LOG_WARNING(::Bigfoot::Singleton<::Bigfoot::Log>::Instance().RegisterLogger(loggerName), \
QUILL_LOG_WARNING(::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().RegisterLogger(loggerName), \
fmt __VA_OPT__(, ) __VA_ARGS__); \
} \
} while (0)
@@ -69,13 +69,13 @@
#define BIGFOOT_LOG_ERROR(loggerName, fmt, ...) \
do \
{ \
if (::quill::Logger* logger = ::Bigfoot::Singleton<::Bigfoot::Log>::Instance().GetLogger(loggerName)) \
if (::quill::Logger* logger = ::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().GetLogger(loggerName)) \
{ \
QUILL_LOG_ERROR(logger, fmt __VA_OPT__(, ) __VA_ARGS__); \
} \
else \
{ \
QUILL_LOG_ERROR(::Bigfoot::Singleton<::Bigfoot::Log>::Instance().RegisterLogger(loggerName), \
QUILL_LOG_ERROR(::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().RegisterLogger(loggerName), \
fmt __VA_OPT__(, ) __VA_ARGS__); \
} \
} while (0)
@@ -83,13 +83,13 @@
#define BIGFOOT_LOG_FATAL(loggerName, fmt, ...) \
do \
{ \
if (::quill::Logger* logger = ::Bigfoot::Singleton<::Bigfoot::Log>::Instance().GetLogger(loggerName)) \
if (::quill::Logger* logger = ::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().GetLogger(loggerName)) \
{ \
QUILL_LOG_CRITICAL(logger, fmt __VA_OPT__(, ) __VA_ARGS__); \
} \
else \
{ \
QUILL_LOG_CRITICAL(::Bigfoot::Singleton<::Bigfoot::Log>::Instance().RegisterLogger(loggerName), \
QUILL_LOG_CRITICAL(::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().RegisterLogger(loggerName), \
fmt __VA_OPT__(, ) __VA_ARGS__); \
} \
} while (0)
@@ -26,7 +26,7 @@ class Singleton
*
* \return The instance
*/
static constexpr TYPE& Instance()
static constexpr TYPE& GetInstance()
{
return ms_instance.value();
}
@@ -53,7 +53,7 @@ class Version
* \return The major part of the version.
*/
[[nodiscard]]
constexpr std::uint8_t Major() const
constexpr std::uint8_t GetMajor() const
{
constexpr std::uint32_t mask = 0b00000000111111110000000000000000;
@@ -66,7 +66,7 @@ class Version
* \return The minor part of the version.
*/
[[nodiscard]]
constexpr std::uint8_t Minor() const
constexpr std::uint8_t GetMinor() const
{
constexpr std::uint32_t mask = 0b00000000000000001111111100000000;
@@ -79,7 +79,7 @@ class Version
* \return The patch part of the version.
*/
[[nodiscard]]
constexpr std::uint8_t Patch() const
constexpr std::uint8_t GetPatch() const
{
constexpr std::uint32_t mask = 0b00000000000000000000000011111111;
@@ -95,38 +95,10 @@ class Version
operator std::string() const;
constexpr Version& operator=(const Version& p_version) = default;
constexpr Version& operator=(Version&& p_version) = default;
[[nodiscard]]
constexpr bool operator>(const Version& p_version) const
{
return m_combined > p_version.m_combined;
}
[[nodiscard]]
constexpr bool operator<(const Version& p_version) const
{
return m_combined < p_version.m_combined;
}
[[nodiscard]]
constexpr bool operator>=(const Version& p_version) const
{
return m_combined >= p_version.m_combined;
}
[[nodiscard]]
constexpr bool operator<=(const Version& p_version) const
{
return m_combined <= p_version.m_combined;
}
[[nodiscard]]
constexpr bool operator==(const Version& p_version) const = default;
[[nodiscard]]
constexpr bool operator!=(const Version& p_version) const = default;
constexpr auto operator<=>(const Version& p_version) const = default;
private:
/**
+1 -1
View File
@@ -10,6 +10,6 @@ namespace Bigfoot
{
Version::operator std::string() const
{
return std::format("{}.{}.{}", Major(), Minor(), Patch());
return std::format("{}.{}.{}", GetMajor(), GetMinor(), GetPatch());
}
} // namespace Bigfoot