From efc2260434c357e35f0dfbeb1dbc6ac634a1c64a Mon Sep 17 00:00:00 2001 From: gibber9809 Date: Thu, 24 Oct 2024 14:54:34 +0000 Subject: [PATCH] Clean up suggested by coderabbit --- components/core/src/clp_s/ArchiveReader.cpp | 8 ++++---- components/core/src/clp_s/ArchiveWriter.cpp | 10 +++++----- components/core/src/clp_s/SchemaReader.hpp | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/components/core/src/clp_s/ArchiveReader.cpp b/components/core/src/clp_s/ArchiveReader.cpp index 8c91ef89c..5362d32cc 100644 --- a/components/core/src/clp_s/ArchiveReader.cpp +++ b/components/core/src/clp_s/ArchiveReader.cpp @@ -63,10 +63,10 @@ void ArchiveReader::read_metadata() { SchemaReader::SchemaMetadata prev_metadata{}; int32_t prev_schema_id{}; for (size_t i = 0; i < num_schemas; ++i) { - size_t stream_id; - size_t stream_offset; + uint64_t stream_id; + uint64_t stream_offset; int32_t schema_id; - size_t num_messages; + uint64_t num_messages; if (auto error = m_table_metadata_decompressor.try_read_numeric_value(stream_id); ErrorCodeSuccess != error) @@ -97,7 +97,7 @@ void ArchiveReader::read_metadata() { } if (prev_metadata_initialized) { - size_t uncompressed_size{0}; + uint64_t uncompressed_size{0}; if (stream_id != prev_metadata.stream_id) { uncompressed_size = m_stream_reader.get_uncompressed_stream_size(prev_metadata.stream_id) diff --git a/components/core/src/clp_s/ArchiveWriter.cpp b/components/core/src/clp_s/ArchiveWriter.cpp index dc82d22a7..ef10d116d 100644 --- a/components/core/src/clp_s/ArchiveWriter.cpp +++ b/components/core/src/clp_s/ArchiveWriter.cpp @@ -180,8 +180,8 @@ size_t ArchiveWriter::store_tables() { */ using schema_map_it = decltype(m_id_to_schema_writer)::iterator; std::vector schemas; - std::vector> stream_metadata; - std::vector> schema_metadata; + std::vector> stream_metadata; + std::vector> schema_metadata; schema_metadata.reserve(m_id_to_schema_writer.size()); schemas.reserve(m_id_to_schema_writer.size()); @@ -194,9 +194,9 @@ size_t ArchiveWriter::store_tables() { }; std::sort(schemas.begin(), schemas.end(), comp); - size_t current_stream_offset = 0; - size_t current_stream_id = 0; - size_t current_table_file_offset = 0; + uint64_t current_stream_offset = 0; + uint64_t current_stream_id = 0; + uint64_t current_table_file_offset = 0; m_tables_compressor.open(m_tables_file_writer, m_compression_level); for (auto it : schemas) { it->second->store(m_tables_compressor); diff --git a/components/core/src/clp_s/SchemaReader.hpp b/components/core/src/clp_s/SchemaReader.hpp index 1dbf36b1d..08651cc39 100644 --- a/components/core/src/clp_s/SchemaReader.hpp +++ b/components/core/src/clp_s/SchemaReader.hpp @@ -50,10 +50,10 @@ class SchemaReader { }; struct SchemaMetadata { - size_t stream_id; - size_t stream_offset; - size_t num_messages; - size_t uncompressed_size; + uint64_t stream_id; + uint64_t stream_offset; + uint64_t num_messages; + uint64_t uncompressed_size; }; // Constructor