clangify includes
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
#include <utils.hpp>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <filesystem>
|
||||
#include <format>
|
||||
#include <log.hpp>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <utils.hpp>
|
||||
|
||||
// pads given string to length
|
||||
std::string pad(std::string s, uint8_t len, bool ljust) {
|
||||
@@ -23,8 +33,8 @@ std::string pBytes(double bytes, bool isKbytes) {
|
||||
if (suffix == 'K' && isKbytes) continue; // skip first loop if already in Kbytes
|
||||
bytes /= 1024.0;
|
||||
if (bytes < 1024) {
|
||||
if(bytes > 100) return pNum(bytes) + suffix;
|
||||
if(bytes > 10) return pNum(bytes, 1) + suffix;
|
||||
if (bytes > 100) return pNum(bytes) + suffix;
|
||||
if (bytes > 10) return pNum(bytes, 1) + suffix;
|
||||
return pNum(bytes, 2) + suffix;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user