Skip to content

Commit

Permalink
address cpplint issues: replace C-styla casts
Browse files Browse the repository at this point in the history
  • Loading branch information
schlimmchen committed Nov 12, 2024
1 parent 236c172 commit 28302fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ void ConfigurationClass::serializePowerLimiterConfig(PowerLimiterConfig const& s
char serialBuffer[sizeof(uint64_t) * 8 + 1];
auto serialStr = [&serialBuffer](uint64_t const& serial) -> String {
snprintf(serialBuffer, sizeof(serialBuffer), "%0x%08x",
((uint32_t)((serial >> 32) & 0xFFFFFFFF)),
((uint32_t)(serial & 0xFFFFFFFF)));
static_cast<uint32_t>((serial >> 32) & 0xFFFFFFFF),
static_cast<uint32_t>(serial & 0xFFFFFFFF));
return String(serialBuffer);
};

Expand Down
4 changes: 2 additions & 2 deletions src/PowerLimiterInverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ PowerLimiterInverter::PowerLimiterInverter(bool verboseLogging, PowerLimiterInve
if (!_spInverter) { return; }

snprintf(_serialStr, sizeof(_serialStr), "%0x%08x",
((uint32_t)((config.Serial >> 32) & 0xFFFFFFFF)),
((uint32_t)(config.Serial & 0xFFFFFFFF)));
static_cast<uint32_t>((config.Serial >> 32) & 0xFFFFFFFF),
static_cast<uint32_t>(config.Serial & 0xFFFFFFFF));

snprintf(_logPrefix, sizeof(_logPrefix), "[DPL inverter %s]:", _serialStr);
}
Expand Down

0 comments on commit 28302fe

Please sign in to comment.