diff --git a/openVulkanoCpp/Base/Utils.cpp b/openVulkanoCpp/Base/Utils.cpp index 57533e3..95c2ca7 100644 --- a/openVulkanoCpp/Base/Utils.cpp +++ b/openVulkanoCpp/Base/Utils.cpp @@ -74,46 +74,4 @@ namespace OpenVulkano file.close(); return data; } - - std::string Utils::PrettyBytes(uint64_t bytes) - { - static const uint64_t TERABYTES = 1024ULL*1024*1024*1024; - static const uint64_t GIGABYTES = 1024ULL*1024*1024; - static const uint64_t MEGABYTES = 1024*1024; - static const uint64_t KILOBYTES = 1024; - - int TB, GB, MB, KB; - TB = bytes / TERABYTES; - bytes -= TB * TERABYTES; - GB = bytes / GIGABYTES; - bytes -= GB * GIGABYTES; - MB = bytes / MEGABYTES; - bytes -= MB * MEGABYTES; - KB = bytes / KILOBYTES; - bytes -= KB * KILOBYTES; - - std::string result; - if(TB) - { - result = std::to_string(TB) + " TB"; - } - else if(GB) - { - result = std::to_string(GB) + " GB"; - } - else if(MB) - { - result = std::to_string(MB) + " MB"; - } - else if(KB) - { - result = std::to_string(KB) + " KB"; - } - else - { - result = std::to_string(bytes) + " B"; - } - - return result; - } } diff --git a/openVulkanoCpp/Base/Utils.hpp b/openVulkanoCpp/Base/Utils.hpp index 0f6c499..34fc5dc 100644 --- a/openVulkanoCpp/Base/Utils.hpp +++ b/openVulkanoCpp/Base/Utils.hpp @@ -138,6 +138,5 @@ namespace OpenVulkano } static Array ReadFile(const std::string& filePath, bool emptyOnMissing = false); - static std::string PrettyBytes(uint64_t bytes); }; }