From 747a4191f3777c74cca7980dd7aef61bb15eeb2c Mon Sep 17 00:00:00 2001 From: Miki Rozloznik Date: Wed, 19 Jun 2024 09:37:48 +0200 Subject: [PATCH] Test --- compiler/extensions/cpp/runtime/ClangTidySuppressions.txt | 4 ++-- compiler/extensions/cpp/runtime/src/zserio/DeltaContext.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/compiler/extensions/cpp/runtime/ClangTidySuppressions.txt b/compiler/extensions/cpp/runtime/ClangTidySuppressions.txt index 5180037b0..2a2129643 100644 --- a/compiler/extensions/cpp/runtime/ClangTidySuppressions.txt +++ b/compiler/extensions/cpp/runtime/ClangTidySuppressions.txt @@ -4,8 +4,8 @@ bugprone-signed-char-misuse:src/zserio/DeltaContext.h:95 bugprone-signed-char-misuse:src/zserio/DeltaContext.h:113 bugprone-signed-char-misuse:src/zserio/DeltaContext.h:176 bugprone-signed-char-misuse:src/zserio/DeltaContext.h:212 -bugprone-signed-char-misuse:src/zserio/DeltaContext.h:343 -bugprone-signed-char-misuse:src/zserio/DeltaContext.h:370 +bugprone-signed-char-misuse:src/zserio/DeltaContext.h:342 +bugprone-signed-char-misuse:src/zserio/DeltaContext.h:369 # This is necessary for implementation of low level implementation of Span and StringView to mimic standard # C++17 'std::span' and 'std::string_view' abstractions. diff --git a/compiler/extensions/cpp/runtime/src/zserio/DeltaContext.h b/compiler/extensions/cpp/runtime/src/zserio/DeltaContext.h index d709488d9..b2f25b0a4 100644 --- a/compiler/extensions/cpp/runtime/src/zserio/DeltaContext.h +++ b/compiler/extensions/cpp/runtime/src/zserio/DeltaContext.h @@ -274,8 +274,7 @@ class DeltaContext if (isFlagSet(IS_PACKED_FLAG)) { const size_t deltaBitSize = static_cast(m_maxBitNumber) + (m_maxBitNumber > 0 ? 1 : 0); - const size_t packedBitSizeWithDescriptor = static_cast(1) + - MAX_BIT_NUMBER_BITS + // descriptor + const size_t packedBitSizeWithDescriptor = 1U + MAX_BIT_NUMBER_BITS + // descriptor m_firstElementBitSize + (m_numElements - 1) * deltaBitSize; const size_t unpackedBitSizeWithDescriptor = 1 + m_unpackedBitSize; if (packedBitSizeWithDescriptor >= unpackedBitSizeWithDescriptor)