1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 08:52:40 +01:00

Codechange: use const for std::string_view where appropriate

This commit is contained in:
Rubidium
2025-04-29 07:10:48 +02:00
committed by rubidium42
parent 78250c3bba
commit af25eecc15
34 changed files with 87 additions and 87 deletions

View File

@@ -529,8 +529,8 @@ static void FormatBytes(StringBuilder &builder, int64_t number)
{
assert(number >= 0);
/* 1 2^10 2^20 2^30 2^40 2^50 2^60 */
const std::string_view iec_prefixes[] = {"", "Ki", "Mi", "Gi", "Ti", "Pi", "Ei"};
/* 1 2^10 2^20 2^30 2^40 2^50 2^60 */
static const std::string_view iec_prefixes[] = {"", "Ki", "Mi", "Gi", "Ti", "Pi", "Ei"};
uint id = 1;
while (number >= 1024 * 1024) {
number /= 1024;