display code clean

This commit is contained in:
Patrick Haßel 2025-03-13 10:36:38 +01:00
parent 5222d90890
commit 60e178a60d

View File

@ -122,9 +122,9 @@ void drawDots(const Color& bottom, const Color& middleBottom, const Color& middl
void drawMillisDeci(const unsigned long millisTotal, const Color& color) { void drawMillisDeci(const unsigned long millisTotal, const Color& color) {
const auto secondsTotal = millisTotal / 1000; const auto secondsTotal = millisTotal / 1000;
const auto minutes = (int)secondsTotal / 60; const auto minutes = static_cast<int>(secondsTotal) / 60;
const auto seconds = (int)secondsTotal % 60; const auto seconds = static_cast<int>(secondsTotal) % 60;
const auto deci = (int)millisTotal / 100 % 10; const auto deci = static_cast<int>(millisTotal) / 100 % 10;
pixels.clear(); pixels.clear();
if (minutes > 0) { if (minutes > 0) {
@ -142,9 +142,9 @@ void drawMillisDeci(const unsigned long millisTotal, const Color& color) {
} }
void drawMillis(const unsigned long millisTotal, const Color& color) { void drawMillis(const unsigned long millisTotal, const Color& color) {
const auto secondsTotal = (unsigned long)ceil(millisTotal / 1000.0); const auto secondsTotal = static_cast<unsigned long>(ceil(millisTotal / 1000.0));
const auto minutes = (int)secondsTotal / 60; const auto minutes = static_cast<int>(secondsTotal) / 60;
const auto seconds = (int)secondsTotal % 60; const auto seconds = static_cast<int>(secondsTotal) % 60;
pixels.clear(); pixels.clear();
if (minutes > 0) { if (minutes > 0) {