mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-12 17:00:25 +08:00
Do not fill blanks to align if there is only one line.
This commit is contained in:
parent
f5313f92f1
commit
02bfa0898c
@ -176,6 +176,8 @@ struct formatter<spdlog::details::dump_info<T>>
|
|||||||
*inserter++ = hex_chars[ch & 0x0f];
|
*inserter++ = hex_chars[ch & 0x0f];
|
||||||
}
|
}
|
||||||
if (show_ascii)
|
if (show_ascii)
|
||||||
|
{
|
||||||
|
if (the_range.end() - the_range.begin() > size_per_line)
|
||||||
{
|
{
|
||||||
auto blank_num = size_per_line - (the_range.end() - start_of_line);
|
auto blank_num = size_per_line - (the_range.end() - start_of_line);
|
||||||
while (blank_num-- > 0)
|
while (blank_num-- > 0)
|
||||||
@ -187,6 +189,7 @@ struct formatter<spdlog::details::dump_info<T>>
|
|||||||
*inserter++ = ' ';
|
*inserter++ = ' ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
*inserter++ = ' ';
|
*inserter++ = ' ';
|
||||||
*inserter++ = ' ';
|
*inserter++ = ' ';
|
||||||
for (auto j = start_of_line; j != the_range.end(); j++)
|
for (auto j = start_of_line; j != the_range.end(); j++)
|
||||||
|
Loading…
Reference in New Issue
Block a user