Pass through issues reported by sonarqube
Bigfoot / Sonarqube (push) Skipped
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: game) (push) Failing after 21s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: game) (push) Failing after 26s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: game) (push) Failing after 26s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: ON, Variant: game) (push) Failing after 17s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: toolmode) (push) Failing after 26s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: ON, Variant: toolmode) (push) Failing after 19s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: game) (push) Failing after 27s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: toolmode) (push) Failing after 28s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: toolmode) (push) Failing after 24s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: game) (push) Failing after 29s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: ON, Variant: game) (push) Failing after 26s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: toolmode) (push) Failing after 30s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: ON, Variant: toolmode) (push) Failing after 30s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: game) (push) Failing after 35s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: game) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: toolmode) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: ON, Variant: game) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: ON, Variant: toolmode) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: game) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: toolmode) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: game) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: toolmode) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: toolmode) (push) Canceled after 0s
Bigfoot / Clang Format Checks (push) Canceled after 0s
Bigfoot / Sonarqube (pull_request) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: toolmode) (push) Canceled after 13s
Bigfoot / Sonarqube (push) Skipped
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: game) (push) Failing after 21s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: game) (push) Failing after 26s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: game) (push) Failing after 26s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: ON, Variant: game) (push) Failing after 17s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: toolmode) (push) Failing after 26s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: ON, Variant: toolmode) (push) Failing after 19s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: game) (push) Failing after 27s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: toolmode) (push) Failing after 28s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: toolmode) (push) Failing after 24s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: game) (push) Failing after 29s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: ON, Variant: game) (push) Failing after 26s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: toolmode) (push) Failing after 30s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: ON, Variant: toolmode) (push) Failing after 30s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: game) (push) Failing after 35s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: game) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: toolmode) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: ON, Variant: game) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: ON, Variant: toolmode) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: game) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: toolmode) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: game) (push) Canceled after 0s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: toolmode) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: toolmode) (push) Canceled after 0s
Bigfoot / Clang Format Checks (push) Canceled after 0s
Bigfoot / Sonarqube (pull_request) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: toolmode) (push) Canceled after 13s
This commit is contained in:
@@ -19,10 +19,9 @@ SasquatchWriter::SasquatchWriter(const File& p_file,
|
||||
const std::size_t p_totalFlatbufferBytes,
|
||||
const std::size_t p_totalHardReferencesBytes):
|
||||
m_assetCount(p_assetCount),
|
||||
m_prefetchedUpTo(0),
|
||||
m_currentDataOffset(sizeof(SasquatchHeader) + m_assetCount * sizeof(SasquatchEntry)),
|
||||
m_currentDataOffset(sizeof(SasquatchHeader) + (m_assetCount * sizeof(SasquatchEntry))),
|
||||
m_file(p_file,
|
||||
sizeof(SasquatchHeader) + m_assetCount * sizeof(SasquatchEntry) + p_totalFlatbufferBytes +
|
||||
sizeof(SasquatchHeader) + (m_assetCount * sizeof(SasquatchEntry)) + p_totalFlatbufferBytes +
|
||||
p_totalHardReferencesBytes)
|
||||
{
|
||||
m_entries.reserve(m_assetCount);
|
||||
@@ -68,11 +67,11 @@ void SasquatchWriter::WriteAsset(const UUID& p_uuid,
|
||||
|
||||
const eastl::span<std::byte> data = m_file.GetData();
|
||||
ASSERT(EngineAssertHandler,
|
||||
offset + p_flatbuffer.size() + p_hardReferences.size() * UUID::UUID_BYTE_SIZE <= data.size(),
|
||||
offset + p_flatbuffer.size() + (p_hardReferences.size() * UUID::UUID_BYTE_SIZE) <= data.size(),
|
||||
"SasquatchWriter can only write {} bytes",
|
||||
data.size());
|
||||
|
||||
const std::size_t writeEnd = offset + p_flatbuffer.size() + p_hardReferences.size() * UUID::UUID_BYTE_SIZE;
|
||||
const std::size_t writeEnd = offset + p_flatbuffer.size() + (p_hardReferences.size() * UUID::UUID_BYTE_SIZE);
|
||||
if (writeEnd > m_prefetchedUpTo)
|
||||
{
|
||||
const std::size_t prefetchEnd = std::min(writeEnd + PREFETCH_BYTES, data.size());
|
||||
@@ -92,7 +91,7 @@ void SasquatchWriter::WriteAsset(const UUID& p_uuid,
|
||||
for (std::uint32_t i = 0; i < p_hardReferences.size(); ++i)
|
||||
{
|
||||
const std::span<const std::byte, UUID::UUID_BYTE_SIZE> rawUUID = p_hardReferences[i].ToBytes();
|
||||
std::memcpy(data.data() + entry.m_hardReferencesOffset + i * UUID::UUID_BYTE_SIZE,
|
||||
std::memcpy(data.data() + entry.m_hardReferencesOffset + (static_cast<std::size_t>(i) * UUID::UUID_BYTE_SIZE),
|
||||
rawUUID.data(),
|
||||
UUID::UUID_BYTE_SIZE);
|
||||
}
|
||||
@@ -129,11 +128,11 @@ Sasquatch::Sasquatch(const File& p_file):
|
||||
SasquatchHeader::VERSION);
|
||||
|
||||
CRITICAL_ASSERT(EngineAssertHandler,
|
||||
data.size() >= sizeof(SasquatchHeader) + m_header.m_assetCount * sizeof(SasquatchEntry),
|
||||
data.size() >= sizeof(SasquatchHeader) + (m_header.m_assetCount * sizeof(SasquatchEntry)),
|
||||
"Sasquatch file {} index is truncated (got {} / expected at least {})",
|
||||
p_file.GetPath(),
|
||||
data.size(),
|
||||
sizeof(SasquatchHeader) + m_header.m_assetCount * sizeof(SasquatchEntry));
|
||||
sizeof(SasquatchHeader) + (m_header.m_assetCount * sizeof(SasquatchEntry)));
|
||||
|
||||
eastl::vector<SasquatchEntry> entries(m_header.m_assetCount);
|
||||
if (!entries.empty())
|
||||
@@ -168,15 +167,15 @@ const SasquatchHeader& Sasquatch::GetHeader() const
|
||||
|
||||
eastl::vector<std::byte> Sasquatch::GetAssetFlatbuffer(const UUID& p_uuid) const
|
||||
{
|
||||
const auto it = m_entries.find(p_uuid);
|
||||
if (it == m_entries.end())
|
||||
const auto entryIt = m_entries.find(p_uuid);
|
||||
if (entryIt == m_entries.end())
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
const eastl::span<const std::byte> data = m_file.GetData();
|
||||
const eastl::span<const std::byte> bytes {data.data() + it->second.m_assetOffset,
|
||||
static_cast<std::size_t>(it->second.m_assetSize)};
|
||||
const eastl::span<const std::byte> bytes {data.data() + entryIt->second.m_assetOffset,
|
||||
static_cast<std::size_t>(entryIt->second.m_assetSize)};
|
||||
return eastl::vector<std::byte> {bytes.begin(), bytes.end()};
|
||||
}
|
||||
|
||||
@@ -201,15 +200,15 @@ eastl::vector<UUID> Sasquatch::GetAssetHardReferences(const UUID& p_uuid) const
|
||||
{
|
||||
eastl::vector<UUID> hardReferences;
|
||||
|
||||
const auto it = m_entries.find(p_uuid);
|
||||
if (it == m_entries.end())
|
||||
const auto entryIt = m_entries.find(p_uuid);
|
||||
if (entryIt == m_entries.end())
|
||||
{
|
||||
return hardReferences;
|
||||
}
|
||||
|
||||
const eastl::span<const std::byte> data = m_file.GetData();
|
||||
const eastl::span<const std::byte> bytes {data.data() + it->second.m_hardReferencesOffset,
|
||||
static_cast<std::size_t>(it->second.m_hardReferencesSize)};
|
||||
const eastl::span<const std::byte> bytes {data.data() + entryIt->second.m_hardReferencesOffset,
|
||||
static_cast<std::size_t>(entryIt->second.m_hardReferencesSize)};
|
||||
|
||||
const std::size_t hardReferenceCount = bytes.size() / UUID::UUID_BYTE_SIZE;
|
||||
hardReferences.reserve(hardReferenceCount);
|
||||
@@ -217,7 +216,7 @@ eastl::vector<UUID> Sasquatch::GetAssetHardReferences(const UUID& p_uuid) const
|
||||
for (std::size_t i = 0; i < hardReferenceCount; ++i)
|
||||
{
|
||||
std::array<std::byte, UUID::UUID_BYTE_SIZE> rawUUID;
|
||||
std::memcpy(rawUUID.data(), bytes.data() + i * UUID::UUID_BYTE_SIZE, UUID::UUID_BYTE_SIZE);
|
||||
std::memcpy(rawUUID.data(), bytes.data() + (i * UUID::UUID_BYTE_SIZE), UUID::UUID_BYTE_SIZE);
|
||||
hardReferences.emplace_back(rawUUID);
|
||||
}
|
||||
|
||||
@@ -261,7 +260,7 @@ void Sasquatch::SaveAssetFlatbuffers([[maybe_unused]] const eastl::span<const UU
|
||||
|
||||
bool Sasquatch::Has(const UUID& p_uuid) const
|
||||
{
|
||||
return m_entries.find(p_uuid) != m_entries.end();
|
||||
return m_entries.contains(p_uuid);
|
||||
}
|
||||
#endif
|
||||
} // namespace Bigfoot
|
||||
|
||||
Reference in New Issue
Block a user