Skip to content
Snippets Groups Projects
Commit 15de86ed authored by Atkins, Charles Vernon's avatar Atkins, Charles Vernon
Browse files

Reinstate the use of reinterpret_cast

parent a4ad2d7a
No related branches found
No related tags found
1 merge request!28Reinstate the use of reinterpret_cast
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
......
......@@ -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]));
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment