Address RDA/RPG Build 23.0 clang-tidy comments

This commit is contained in:
Dan Paulat 2025-05-17 15:44:41 -05:00
parent ade40806b6
commit 018052b78d
6 changed files with 8 additions and 8 deletions

View file

@ -9,7 +9,7 @@ class RdaPrfData : public Level2Message
{ {
public: public:
explicit RdaPrfData(); explicit RdaPrfData();
~RdaPrfData(); ~RdaPrfData() override;
RdaPrfData(const RdaPrfData&) = delete; RdaPrfData(const RdaPrfData&) = delete;
RdaPrfData& operator=(const RdaPrfData&) = delete; RdaPrfData& operator=(const RdaPrfData&) = delete;

View file

@ -12,7 +12,7 @@ class DigitalRasterDataArrayPacket : public Packet
{ {
public: public:
explicit DigitalRasterDataArrayPacket(); explicit DigitalRasterDataArrayPacket();
~DigitalRasterDataArrayPacket(); ~DigitalRasterDataArrayPacket() override;
DigitalRasterDataArrayPacket(const DigitalRasterDataArrayPacket&) = delete; DigitalRasterDataArrayPacket(const DigitalRasterDataArrayPacket&) = delete;
DigitalRasterDataArrayPacket& DigitalRasterDataArrayPacket&

View file

@ -142,9 +142,9 @@ Level2MessageInfo Level2MessageFactory::Create(std::istream& is,
// Estimate remaining size // Estimate remaining size
static const std::uint16_t kMinRemainingSegments_ = 100u; static const std::uint16_t kMinRemainingSegments_ = 100u;
std::uint16_t remainingSegments = std::max<std::uint16_t>( const std::uint16_t remainingSegments = std::max<std::uint16_t>(
totalSegments - segment + 1, kMinRemainingSegments_); totalSegments - segment + 1, kMinRemainingSegments_);
std::size_t remainingSize = remainingSegments * dataSize; const std::size_t remainingSize = remainingSegments * dataSize;
ctx->messageData_.resize(ctx->bufferedSize_ + remainingSize); ctx->messageData_.resize(ctx->bufferedSize_ + remainingSize);
} }

View file

@ -42,7 +42,7 @@ bool RdaPrfData::Parse(std::istream& is)
bool messageValid = true; bool messageValid = true;
std::size_t bytesRead = 0; std::size_t bytesRead = 0;
std::streampos isBegin = is.tellg(); const std::streampos isBegin = is.tellg();
is.read(reinterpret_cast<char*>(&p->numberOfWaveforms_), 2); // 1 is.read(reinterpret_cast<char*>(&p->numberOfWaveforms_), 2); // 1
is.seekg(2, std::ios_base::cur); // 2 is.seekg(2, std::ios_base::cur); // 2

View file

@ -185,7 +185,7 @@ bool DigitalRasterDataArrayPacket::Parse(std::istream& is)
} }
// Read raster bins // Read raster bins
std::size_t dataSize = p->numberOfCells_; const std::size_t dataSize = p->numberOfCells_;
row.level_.resize(dataSize); row.level_.resize(dataSize);
is.read(reinterpret_cast<char*>(row.level_.data()), is.read(reinterpret_cast<char*>(row.level_.data()),
static_cast<std::streamsize>(dataSize)); static_cast<std::streamsize>(dataSize));

View file

@ -1073,11 +1073,11 @@ ProductDescriptionBlock::data_level_code(std::uint8_t level) const
if (number_of_levels() <= 16 && level < 16 && if (number_of_levels() <= 16 && level < 16 &&
!uncodedDataLevelProducts_.contains(p->productCode_)) !uncodedDataLevelProducts_.contains(p->productCode_))
{ {
std::uint16_t th = data_level_threshold(level); const std::uint16_t th = data_level_threshold(level);
if ((th & 0x8000u)) if ((th & 0x8000u))
{ {
// If bit 0 is one, then the LSB is coded // If bit 0 is one, then the LSB is coded
std::uint16_t lsb = th & 0x00ffu; const std::uint16_t lsb = th & 0x00ffu;
switch (lsb) switch (lsb)
{ {