format
Bigfoot / Sonarqube (push) Skipped
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: game) (push) Successful in 5m21s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: game) (push) Successful in 2m14s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: toolmode) (push) Successful in 29s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: ON, Variant: game) (push) Successful in 20s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: toolmode) (push) Successful in 29s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: ON, Variant: toolmode) (push) Successful in 21s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: game) (push) Successful in 40s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: toolmode) (push) Successful in 51s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: toolmode) (push) Successful in 42s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: game) (push) Successful in 2m26s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: ON, Variant: game) (push) Successful in 22s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: ON, Variant: toolmode) (push) Successful in 20s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: game) (push) Successful in 3m40s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: game) (push) Successful in 40s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: toolmode) (push) Successful in 50s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: toolmode) (push) Successful in 42s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: game) (push) Successful in 2m10s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: ON, Variant: game) (push) Successful in 19s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: toolmode) (push) Successful in 31s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: ON, Variant: toolmode) (push) Successful in 27s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: game) (push) Successful in 3m13s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: game) (push) Successful in 31s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: toolmode) (push) Successful in 38s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: toolmode) (push) Successful in 34s
Bigfoot / Clang Format Checks (push) Successful in 9s

This commit is contained in:
2026-08-25 18:49:34 +02:00
parent 2572922af9
commit 65da7522ef
5 changed files with 22 additions and 21 deletions
+13 -14
View File
@@ -10,7 +10,6 @@
#include <EASTL/algorithm.h> #include <EASTL/algorithm.h>
#include <EASTL/sort.h> #include <EASTL/sort.h>
#include <fmt/format.h> #include <fmt/format.h>
namespace Bigfoot namespace Bigfoot
@@ -89,9 +88,9 @@ eastl::vector<eastl::vector<std::byte>> BigFile::GetAssetFlatbuffers(const eastl
} }
const std::string sqlRequest = fmt::format("SELECT Asset.Asset FROM Asset " const std::string sqlRequest = fmt::format("SELECT Asset.Asset FROM Asset "
"JOIN AssetMetadata ON AssetMetadata.UUID = Asset.UUID " "JOIN AssetMetadata ON AssetMetadata.UUID = Asset.UUID "
"WHERE Asset.UUID IN ({});", "WHERE Asset.UUID IN ({});",
placeholders); placeholders);
BigFile::Request assetRequest {*this, sqlRequest.c_str()}; BigFile::Request assetRequest {*this, sqlRequest.c_str()};
for (std::size_t i = 0; i < uniqueUUIDs.size(); ++i) for (std::size_t i = 0; i < uniqueUUIDs.size(); ++i)
@@ -140,8 +139,8 @@ eastl::vector<AssetMetadata> BigFile::GetAssetMetadatas(const eastl::span<const
} }
const std::string sqlRequest = fmt::format("SELECT UUID, Name, TypeID, TypeName, CreateTime, ModificationTime " const std::string sqlRequest = fmt::format("SELECT UUID, Name, TypeID, TypeName, CreateTime, ModificationTime "
"FROM AssetMetadata WHERE UUID IN ({});", "FROM AssetMetadata WHERE UUID IN ({});",
placeholders); placeholders);
BigFile::Request assetRequest {*this, sqlRequest.c_str()}; BigFile::Request assetRequest {*this, sqlRequest.c_str()};
for (std::size_t i = 0; i < uniqueUUIDs.size(); ++i) for (std::size_t i = 0; i < uniqueUUIDs.size(); ++i)
@@ -158,14 +157,14 @@ eastl::vector<AssetMetadata> BigFile::GetAssetMetadatas(const eastl::span<const
} }
metadatas.push_back( metadatas.push_back(
AssetMetadata {.m_uuid = UUID {std::span<const std::byte, UUID::UUID_BYTE_SIZE> { AssetMetadata {.m_uuid = UUID {std::span<const std::byte, UUID::UUID_BYTE_SIZE> {
static_cast<eastl::span<const std::byte>>(assetRequest.Get(0)).data(), static_cast<eastl::span<const std::byte>>(assetRequest.Get(0)).data(),
UUID::UUID_BYTE_SIZE}}, UUID::UUID_BYTE_SIZE}},
.m_name = eastl::string {static_cast<eastl::string_view>(assetRequest.Get(1))}, .m_name = eastl::string {static_cast<eastl::string_view>(assetRequest.Get(1))},
.m_typeID = assetRequest.Get(2), .m_typeID = assetRequest.Get(2),
.m_typeName = eastl::string {static_cast<eastl::string_view>(assetRequest.Get(3))}, .m_typeName = eastl::string {static_cast<eastl::string_view>(assetRequest.Get(3))},
.m_creationTime = Time {static_cast<std::uint64_t>(assetRequest.Get(4))}, .m_creationTime = Time {static_cast<std::uint64_t>(assetRequest.Get(4))},
.m_modificationTime = Time {static_cast<std::uint64_t>(assetRequest.Get(5))}}); .m_modificationTime = Time {static_cast<std::uint64_t>(assetRequest.Get(5))}});
} }
return metadatas; return metadatas;
@@ -6,9 +6,8 @@
*********************************************************************/ *********************************************************************/
#ifndef BIGFOOT_SYSTEM_UUID_UUID_HPP #ifndef BIGFOOT_SYSTEM_UUID_UUID_HPP
#define BIGFOOT_SYSTEM_UUID_UUID_HPP #define BIGFOOT_SYSTEM_UUID_UUID_HPP
#include <uuid.h>
#include <fmt/format.h> #include <fmt/format.h>
#include <uuid.h>
namespace Bigfoot namespace Bigfoot
{ {
@@ -14,7 +14,6 @@
#include <EASTL/string.h> #include <EASTL/string.h>
#include <EASTL/string_view.h> #include <EASTL/string_view.h>
#include <fmt/format.h> #include <fmt/format.h>
// STRING // STRING
+4 -3
View File
@@ -57,7 +57,8 @@ TEST_F(BigFileFixture, GetAssetFlatbuffer_ShouldGetTheAssetFlatbuffer)
m_bigFile.SaveAssetFlatbuffer(metadata, flatbuffer); m_bigFile.SaveAssetFlatbuffer(metadata, flatbuffer);
const eastl::optional<eastl::vector<std::byte>> savedFlatbuffer = m_bigFile.GetAssetFlatbuffer(asset.GetHeader().uuid); const eastl::optional<eastl::vector<std::byte>> savedFlatbuffer = m_bigFile.GetAssetFlatbuffer(
asset.GetHeader().uuid);
ASSERT_TRUE(savedFlatbuffer.has_value()); ASSERT_TRUE(savedFlatbuffer.has_value());
EXPECT_EQ(*savedFlatbuffer, flatbuffer); EXPECT_EQ(*savedFlatbuffer, flatbuffer);
} }
@@ -178,9 +179,9 @@ TEST_F(BigFileFixture, GetAssetMetadatas_ShouldOmitUUIDsThatDoNotExist)
ASSERT_EQ(metadatas.size(), 2); ASSERT_EQ(metadatas.size(), 2);
EXPECT_TRUE((metadatas[0].m_uuid == assetA.GetHeader().uuid && metadatas[0].m_name == "hello" && EXPECT_TRUE((metadatas[0].m_uuid == assetA.GetHeader().uuid && metadatas[0].m_name == "hello" &&
metadatas[1].m_uuid == assetB.GetHeader().uuid && metadatas[1].m_name == "world") || metadatas[1].m_uuid == assetB.GetHeader().uuid && metadatas[1].m_name == "world") ||
(metadatas[0].m_uuid == assetB.GetHeader().uuid && metadatas[0].m_name == "world" && (metadatas[0].m_uuid == assetB.GetHeader().uuid && metadatas[0].m_name == "world" &&
metadatas[1].m_uuid == assetA.GetHeader().uuid && metadatas[1].m_name == "hello")); metadatas[1].m_uuid == assetA.GetHeader().uuid && metadatas[1].m_name == "hello"));
} }
/****************************************************************************************/ /****************************************************************************************/
@@ -21,7 +21,10 @@ class DataAccessorFixture: public ::testing::Test
GetAssetFlatbuffers, GetAssetFlatbuffers,
(eastl::span<const UUID> p_uuids), (eastl::span<const UUID> p_uuids),
(const, override)); (const, override));
MOCK_METHOD(eastl::vector<AssetMetadata>, GetAssetMetadatas, (eastl::span<const UUID> p_uuids), (const, override)); MOCK_METHOD(eastl::vector<AssetMetadata>,
GetAssetMetadatas,
(eastl::span<const UUID> p_uuids),
(const, override));
MOCK_METHOD(void, MOCK_METHOD(void,
SaveAssetFlatbuffer, SaveAssetFlatbuffer,
(const AssetMetadata& p_metaData, const eastl::span<const std::byte> p_flatbuffer), (const AssetMetadata& p_metaData, const eastl::span<const std::byte> p_flatbuffer),