mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:53:51 +00:00
made logarithm function for calculating column widths in the output be more generic
This commit is contained in:
parent
5edfe8c41c
commit
32123aec2b
1 changed files with 2 additions and 6 deletions
|
@ -442,12 +442,8 @@ int clone(Arguments& info)
|
||||||
size_t recordCount = info.data.mRecords.size();
|
size_t recordCount = info.data.mRecords.size();
|
||||||
|
|
||||||
int digitCount = 1; // For a nicer output
|
int digitCount = 1; // For a nicer output
|
||||||
if (recordCount > 9) ++digitCount;
|
if (recordCount > 0)
|
||||||
if (recordCount > 99) ++digitCount;
|
digitCount = (int)log10(recordCount) + 1;
|
||||||
if (recordCount > 999) ++digitCount;
|
|
||||||
if (recordCount > 9999) ++digitCount;
|
|
||||||
if (recordCount > 99999) ++digitCount;
|
|
||||||
if (recordCount > 999999) ++digitCount;
|
|
||||||
|
|
||||||
std::cout << "Loaded " << recordCount << " records:" << std::endl << std::endl;
|
std::cout << "Loaded " << recordCount << " records:" << std::endl << std::endl;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue