Skip to content

Commit ad75c33

Browse files
authored
fix(file_system): Fix implicit double (#530)
1 parent cbc3650 commit ad75c33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/file_system/src/file_system.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ size_t FileSystem::get_used_space() const {
7979
std::string FileSystem::human_readable(size_t bytes) {
8080
int i{};
8181
float mantissa = bytes;
82-
for (; mantissa >= 1024.; mantissa /= 1024., ++i) {
82+
for (; mantissa >= 1024.0f; mantissa /= 1024.0f, ++i) {
8383
}
84-
mantissa = std::ceil(mantissa * 10.) / 10.;
84+
mantissa = std::ceilf(mantissa * 10.0f) / 10.0f;
8585
return i == 0 ? fmt::format("{}", bytes) : fmt::format("{:.3f}{}", mantissa, "BKMGTPE"[i]);
8686
}
8787

0 commit comments

Comments
 (0)