diff --git a/.clang-tidy b/.clang-tidy index de0e30accb883f110e1a6c781ab06ced29b22dde..9a497cb87bbae281d1f14e5e6f060938572eb68d 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,4 +1,4 @@ -Checks: -*,cppcoreguidelines-*,google-*,llvm-*,misc-*,modernize-*,performance-*,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-google-runtime-int +Checks: -*,cppcoreguidelines-*,google-*,llvm-*,misc-*,modernize-*,performance-*,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-type-reinterpret-cast,-google-runtime-int CheckOptions: - key: google-runtime-int.TypeSuffix diff --git a/source/format/BP1Writer.cpp b/source/format/BP1Writer.cpp index caafd8e86d7c3e111c7caf98daf7ae9d35ca9377..47b1ab716b5a0eeff07b5f6b22b8bbd5362e08af 100644 --- a/source/format/BP1Writer.cpp +++ b/source/format/BP1Writer.cpp @@ -72,7 +72,7 @@ void BP1Writer::WriteProcessGroupIndex( // offset to pg in data in metadata which is the current absolute position CopyToBuffer(metadataBuffer, - static_cast<uint64_t *>(&heap.m_DataAbsolutePosition)); + reinterpret_cast<uint64_t *>(&heap.m_DataAbsolutePosition)); // Back to writing metadata pg index length (length of group) const std::uint16_t metadataPGIndexLength = @@ -206,7 +206,7 @@ void BP1Writer::WriteDimensionsRecord( auto lf_WriteFlaggedDim = [](std::vector<char> &buffer, const char no, const std::size_t dimension) { CopyToBuffer(buffer, &no); - CopyToBuffer(buffer, static_cast<const uint64_t *>(&dimension)); + CopyToBuffer(buffer, reinterpret_cast<const uint64_t *>(&dimension)); }; // BODY Starts here @@ -227,8 +227,8 @@ void BP1Writer::WriteDimensionsRecord( { for (const auto &localDimension : localDimensions) { - CopyToBuffer(buffer, - static_cast<const uint64_t *>(&localDimension)); + CopyToBuffer(buffer, reinterpret_cast<const uint64_t *>( + &localDimension)); buffer.insert(buffer.end(), skip, 0); } } @@ -250,12 +250,12 @@ void BP1Writer::WriteDimensionsRecord( { for (unsigned int d = 0; d < localDimensions.size(); ++d) { - CopyToBuffer( - buffer, static_cast<const uint64_t *>(&localDimensions[d])); - CopyToBuffer(buffer, static_cast<const uint64_t *>( + CopyToBuffer(buffer, reinterpret_cast<const uint64_t *>( + &localDimensions[d])); + CopyToBuffer(buffer, reinterpret_cast<const uint64_t *>( &globalDimensions[d])); - CopyToBuffer(buffer, - static_cast<const uint64_t *>(&globalOffsets[d])); + CopyToBuffer(buffer, reinterpret_cast<const uint64_t *>( + &globalOffsets[d])); } } }