Commit 94c2810b authored by gabime's avatar gabime

Reduced max padding 128=>64

parent 6e83abdb
......@@ -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]")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment