mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 01:51:38 +08:00
Reduced max padding 128=>64
This commit is contained in:
parent
6e83abdbf2
commit
94c2810b0a
@ -84,9 +84,7 @@ private:
|
||||
const padding_info &padinfo_;
|
||||
fmt::memory_buffer &dest_;
|
||||
size_t total_pad_;
|
||||
string_view_t spaces_{" "
|
||||
" ",
|
||||
128};
|
||||
string_view_t spaces_{" ", 64};
|
||||
};
|
||||
|
||||
class name_formatter : public flag_formatter
|
||||
@ -1217,7 +1215,7 @@ SPDLOG_INLINE details::padding_info pattern_formatter::handle_padspec_(std::stri
|
||||
{
|
||||
using details::padding_info;
|
||||
using details::scoped_pad;
|
||||
const size_t max_width = 128;
|
||||
const size_t max_width = 64;
|
||||
if (it == end)
|
||||
{
|
||||
return padding_info{};
|
||||
|
@ -183,16 +183,14 @@ TEST_CASE("left_padded_huge", "[pattern_formatter]")
|
||||
{
|
||||
REQUIRE(
|
||||
log_to_str("Some message", "[%-300n] %v", spdlog::pattern_time_type::local, "\n") ==
|
||||
"[pattern_tester ]"
|
||||
" Some message\n");
|
||||
"[pattern_tester ] Some message\n");
|
||||
}
|
||||
|
||||
TEST_CASE("left_padded_max", "[pattern_formatter]")
|
||||
{
|
||||
REQUIRE(
|
||||
log_to_str("Some message", "[%-128n] %v", spdlog::pattern_time_type::local, "\n") ==
|
||||
"[pattern_tester ]"
|
||||
" Some message\n");
|
||||
log_to_str("Some message", "[%-64n] %v", spdlog::pattern_time_type::local, "\n") ==
|
||||
"[pattern_tester ] Some message\n");
|
||||
}
|
||||
|
||||
TEST_CASE("clone-default-formatter", "[pattern_formatter]")
|
||||
|
Loading…
Reference in New Issue
Block a user