diff --git a/src/util.cpp b/src/util.cpp index fd37193d3..e6639ee2e 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -149,20 +149,6 @@ int confirm4 (const std::string& question) return 0; } -//////////////////////////////////////////////////////////////////////////////// -// Convert a quantity in seconds to a more readable format. -std::string formatBytes (size_t bytes) -{ - char formatted[24]; - - if (bytes >= 995000000) snprintf (formatted, 24, "%.1f %s", (bytes / 1000000000.0), STRING_UTIL_GIBIBYTES); - else if (bytes >= 995000) snprintf (formatted, 24, "%.1f %s", (bytes / 1000000.0), STRING_UTIL_MEBIBYTES); - else if (bytes >= 995) snprintf (formatted, 24, "%.1f %s", (bytes / 1000.0), STRING_UTIL_KIBIBYTES); - else snprintf (formatted, 24, "%d %s", (int)bytes, STRING_UTIL_BYTES); - - return Lexer::commify (formatted); -} - // Handle the generation of UUIDs on FreeBSD in a separate implementation // of the uuid () function, since the API is quite different from Linux's. // Also, uuid_unparse_lower is not needed on FreeBSD, because the string diff --git a/src/util.h b/src/util.h index a53e6e49b..d3fb12047 100644 --- a/src/util.h +++ b/src/util.h @@ -42,7 +42,6 @@ // util.cpp bool confirm (const std::string&); int confirm4 (const std::string&); -std::string formatBytes (size_t); #ifndef HAVE_UUID_UNPARSE_LOWER void uuid_unparse_lower (uuid_t uu, char *out);