aboutsummaryrefslogtreecommitdiff
path: root/src/zenremotestore/builds/filebuildstorage.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2025-11-01 14:04:35 +0100
committerGitHub Enterprise <[email protected]>2025-11-01 14:04:35 +0100
commita58da97f98697580bf128ed5723ba720cc30f0dc (patch)
tree798e392ddf76128a506293dc0803aaf852203dcd /src/zenremotestore/builds/filebuildstorage.cpp
parentfix use-after-free in TEST_CASE("compactcas.threadedinsert") (#620) (diff)
downloadzen-a58da97f98697580bf128ed5723ba720cc30f0dc.tar.xz
zen-a58da97f98697580bf128ed5723ba720cc30f0dc.zip
Various fixes to address issues flagged by gcc / non-UE toolchain build (#621)
* gcc: avoid using memset on nontrivial struct * redundant `return std::move` * fixed various compilation issues flagged by gcc * fix issue in xmake.lua detecting whether we are building with the UE toolchain or not * add GCC ignore -Wundef (comment is inaccurate) * remove redundant std::move * don't catch exceptions by value * unreferenced variables * initialize "by the book" instead of memset * remove unused exception reference * add #include <cstring> to fix gcc build * explicitly poulate KeyValueMap by traversing input spans fixes gcc compilation * remove unreferenced variable * eliminate redundant `std::move` which gcc complains about * fix gcc compilation by including <cstring> * tag unreferenced variable to fix gcc compilation * fixes for various cases of naming members the same as their type
Diffstat (limited to 'src/zenremotestore/builds/filebuildstorage.cpp')
-rw-r--r--src/zenremotestore/builds/filebuildstorage.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/zenremotestore/builds/filebuildstorage.cpp b/src/zenremotestore/builds/filebuildstorage.cpp
index 3cda5f00f..96d81b281 100644
--- a/src/zenremotestore/builds/filebuildstorage.cpp
+++ b/src/zenremotestore/builds/filebuildstorage.cpp
@@ -14,14 +14,14 @@ namespace zen {
using namespace std::literals;
-class FileBuildStorage : public BuildStorage
+class FileBuildStorage : public BuildStorageBase
{
public:
- explicit FileBuildStorage(const std::filesystem::path& StoragePath,
- BuildStorage::Statistics& Stats,
- bool EnableJsonOutput,
- double LatencySec,
- double DelayPerKBSec)
+ explicit FileBuildStorage(const std::filesystem::path& StoragePath,
+ BuildStorageBase::Statistics& Stats,
+ bool EnableJsonOutput,
+ double LatencySec,
+ double DelayPerKBSec)
: m_StoragePath(StoragePath)
, m_Stats(Stats)
, m_EnableJsonOutput(EnableJsonOutput)
@@ -788,21 +788,21 @@ private:
}
}
- const std::filesystem::path m_StoragePath;
- BuildStorage::Statistics& m_Stats;
- const bool m_EnableJsonOutput = false;
- std::atomic<uint64_t> m_WrittenBytes;
+ const std::filesystem::path m_StoragePath;
+ BuildStorageBase::Statistics& m_Stats;
+ const bool m_EnableJsonOutput = false;
+ std::atomic<uint64_t> m_WrittenBytes;
const double m_LatencySec = 0.0;
const double m_DelayPerKBSec = 0.0;
};
-std::unique_ptr<BuildStorage>
-CreateFileBuildStorage(const std::filesystem::path& StoragePath,
- BuildStorage::Statistics& Stats,
- bool EnableJsonOutput,
- double LatencySec,
- double DelayPerKBSec)
+std::unique_ptr<BuildStorageBase>
+CreateFileBuildStorage(const std::filesystem::path& StoragePath,
+ BuildStorageBase::Statistics& Stats,
+ bool EnableJsonOutput,
+ double LatencySec,
+ double DelayPerKBSec)
{
return std::make_unique<FileBuildStorage>(StoragePath, Stats, EnableJsonOutput, LatencySec, DelayPerKBSec);
}