Skip to content

Commit

Permalink
Removed macOS warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggarra13 committed Sep 11, 2024
1 parent 0e68b48 commit 89e3f70
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/lib/mrvWidgets/mrvFPSInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ namespace
// and then divide by 10
return std::floor(number * 10.0) / 10.0;
}
}

} // namespace

namespace mrv
{
Expand All @@ -28,12 +27,15 @@ namespace mrv

double number = value();

if (w() < 52.0) {
length = sprintf(temp, "%.1f", floorToOnePlace(number));
} else {
length = sprintf(temp, "%.3f", number);
if (w() < 52.0)
{
length = snprintf(temp, 64, "%.1f", floorToOnePlace(number));
}
else
{
length = snprintf(temp, 64, "%.3f", number);
}

strcpy(buffer, temp);
return length;
}
Expand Down

0 comments on commit 89e3f70

Please sign in to comment.