Skip to content

Commit

Permalink
[#1] Add BitBuffer from Zserio C++ runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
Mi-La committed Aug 30, 2024
1 parent 32d5e11 commit 7905319
Show file tree
Hide file tree
Showing 7 changed files with 1,043 additions and 0 deletions.
7 changes: 7 additions & 0 deletions runtime/ClangTidySuppressions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ cppcoreguidelines-pro-bounds-constant-array-index:src/zserio/StringConvertUtil.h
cppcoreguidelines-pro-bounds-constant-array-index:src/zserio/StringConvertUtil.h:54
cppcoreguidelines-pro-bounds-constant-array-index:src/zserio/StringConvertUtil.h:55

# This is necessary for implementation of deprecated constructor which accepts raw pointer. Constructor
# with raw pointer cannot be removed because of backward compatibility.
cppcoreguidelines-pro-bounds-pointer-arithmetic:src/zserio/BitBuffer.h:274

# This is necessary for low level implementation of Span to mimic standard C++20 'std::span' abstraction.
google-explicit-constructor:src/zserio/Span.h:112
google-explicit-constructor:src/zserio/Span.h:125
Expand All @@ -35,10 +39,13 @@ modernize-use-equals-default:src/zserio/Span.h:80

# Intentional tests.
google-explicit-constructor:test/zserio/BuiltInOperatorsTest.cpp:25
google-explicit-constructor:test/zserio/TrackingAllocator.h:78

# Intentional tests.
cppcoreguidelines-avoid-c-arrays:test/zserio/SpanTest.cpp:45

# Intentional tests.
cppcoreguidelines-pro-bounds-pointer-arithmetic:test/zserio/BitBufferTest.cpp:343
cppcoreguidelines-pro-bounds-pointer-arithmetic:test/zserio/BitBufferTest.cpp:357
cppcoreguidelines-pro-bounds-pointer-arithmetic:test/zserio/SpanTest.cpp:34
cppcoreguidelines-pro-bounds-pointer-arithmetic:test/zserio/SpanTest.cpp:38
2 changes: 2 additions & 0 deletions runtime/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ cmake_minimum_required(VERSION 3.15.0)
project(ZserioCpp17Runtime)

set(ZSERIO_CPP17_RUNTIME_LIB_SRCS
zserio/BitBuffer.h
zserio/BitFieldUtil.cpp
zserio/BitPositionUtil.h
zserio/BitFieldUtil.h
Expand All @@ -37,6 +38,7 @@ set(ZSERIO_CPP17_RUNTIME_LIB_SRCS
zserio/String.h
zserio/StringConvertUtil.h
zserio/Types.h
zserio/Vector.h
)

add_library(${PROJECT_NAME} STATIC ${ZSERIO_CPP17_RUNTIME_LIB_SRCS})
Expand Down
Loading

0 comments on commit 7905319

Please sign in to comment.