From a58da97f98697580bf128ed5723ba720cc30f0dc Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Sat, 1 Nov 2025 14:04:35 +0100 Subject: 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 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 * tag unreferenced variable to fix gcc compilation * fixes for various cases of naming members the same as their type --- src/zencore/compactbinaryjson.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/zencore/compactbinaryjson.cpp') diff --git a/src/zencore/compactbinaryjson.cpp b/src/zencore/compactbinaryjson.cpp index 02f22ba4d..abbec360a 100644 --- a/src/zencore/compactbinaryjson.cpp +++ b/src/zencore/compactbinaryjson.cpp @@ -752,13 +752,6 @@ TEST_CASE("uson.json") Buffer.insert(Buffer.end(), AppendBytes, AppendBytes + Count); }; - auto Append = [&](const CbFieldView& Field) { - Field.WriteToStream([&](const void* Data, size_t Count) { - const uint8_t* AppendBytes = reinterpret_cast(Data); - Buffer.insert(Buffer.end(), AppendBytes, AppendBytes + Count); - }); - }; - CbObject DataObjects[] = {MakeObject("Empty object"sv, {}), MakeObject("OneField object"sv, {5}), MakeObject("TwoField object"sv, {-5, 999}), -- cgit v1.2.3