aboutsummaryrefslogtreecommitdiff
path: root/src/zenutil/include
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2025-03-12 10:39:19 +0100
committerStefan Boberg <[email protected]>2025-03-12 10:39:19 +0100
commit29bd50cdece6da99d79c4b70ca275cb78bb76d88 (patch)
treed65828df17e69058ff2bf9cccffa232e75730421 /src/zenutil/include
parentFurther tweaks to build part manifest encoding (diff)
downloadzen-29bd50cdece6da99d79c4b70ca275cb78bb76d88.tar.xz
zen-29bd50cdece6da99d79c4b70ca275cb78bb76d88.zip
changed ReadDeltaArray to return the number of entries in the input array
Diffstat (limited to 'src/zenutil/include')
-rw-r--r--src/zenutil/include/zenutil/chunkedcontent.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/zenutil/include/zenutil/chunkedcontent.h b/src/zenutil/include/zenutil/chunkedcontent.h
index e21be27b0..4fac6d0f3 100644
--- a/src/zenutil/include/zenutil/chunkedcontent.h
+++ b/src/zenutil/include/zenutil/chunkedcontent.h
@@ -292,15 +292,16 @@ namespace compactbinary_helpers {
}
}
- inline void ReadDeltaArray(std::string_view ArrayName, CbObjectView Input, std::vector<uint32_t>& Result)
+ inline uint64_t ReadDeltaArray(std::string_view ArrayName, CbObjectView Input, std::vector<uint32_t>& Result)
{
CbArrayView Array = Input[ArrayName].AsArrayView();
+ uint64_t EncodedEntryCount = 0;
+
{
// Count entries for reserve
- uint64_t EntryCount = 0;
- uint64_t EncodedEntryCount = 0;
+ uint64_t EntryCount = 0;
bool InRun = false;
@@ -367,6 +368,8 @@ namespace compactbinary_helpers {
EmitEntry(DeltaZigZag);
}
}
+
+ return EncodedEntryCount;
}
inline void ReadArray(std::string_view ArrayName, CbObjectView Input, std::vector<uint64_t>& Result)