display text on sub-windows

This commit is contained in:
2020-08-06 11:41:38 +02:00
parent 9322ea65a7
commit 4c6aa1f19c
3 changed files with 43 additions and 41 deletions

View File

@ -46,13 +46,13 @@ uint32_t Drive::getPowerCycles(void)
return u32PowerCycles;
}
string Drive::sCapacityToText(){
if(getCapacity() <= (999*1000000000U)){
string Drive::sCapacityToText() {
if(getCapacity() <= (999*1000000000U)) {
// Less or even 999 GB --> GB
return to_string(getCapacity() / 1000000000U) + " GB";
return to_string(getCapacity() / 1000000000U) + " GB";
}
else{
// More 999 GB --> TB
else {
// More 999 GB --> TB
return to_string(getCapacity() / 1000000000000U) + " TB";
}
return "ERROR";