From 591eedcf36ae2807405e84a2c01c0f64e47098ea Mon Sep 17 00:00:00 2001 From: Dimitris Apostolou Date: Sat, 13 Nov 2021 21:54:08 +0200 Subject: [PATCH 1/2] Fix typos --- include/spdlog/common.h | 2 +- include/spdlog/details/mpmc_blocking_q.h | 4 ++-- include/spdlog/fmt/bin_to_hex.h | 2 +- include/spdlog/sinks/daily_file_sink.h | 2 +- include/spdlog/sinks/stdout_sinks-inl.h | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/spdlog/common.h b/include/spdlog/common.h index ddaa34ce..413d8be7 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -46,7 +46,7 @@ # define SPDLOG_FMT_RUNTIME(format_string) format_string #endif -// visual studio upto 2013 does not support noexcept nor constexpr +// visual studio up to 2013 does not support noexcept nor constexpr #if defined(_MSC_VER) && (_MSC_VER < 1900) # define SPDLOG_NOEXCEPT _NOEXCEPT # define SPDLOG_CONSTEXPR diff --git a/include/spdlog/details/mpmc_blocking_q.h b/include/spdlog/details/mpmc_blocking_q.h index 5c3cca76..b70483e5 100644 --- a/include/spdlog/details/mpmc_blocking_q.h +++ b/include/spdlog/details/mpmc_blocking_q.h @@ -49,7 +49,7 @@ public: push_cv_.notify_one(); } - // try to dequeue item. if no item found. wait upto timeout and try again + // try to dequeue item. if no item found. wait up to timeout and try again // Return true, if succeeded dequeue item, false otherwise bool dequeue_for(T &popped_item, std::chrono::milliseconds wait_duration) { @@ -87,7 +87,7 @@ public: push_cv_.notify_one(); } - // try to dequeue item. if no item found. wait upto timeout and try again + // try to dequeue item. if no item found. wait up to timeout and try again // Return true, if succeeded dequeue item, false otherwise bool dequeue_for(T &popped_item, std::chrono::milliseconds wait_duration) { diff --git a/include/spdlog/fmt/bin_to_hex.h b/include/spdlog/fmt/bin_to_hex.h index 0b6c3e96..202eb146 100644 --- a/include/spdlog/fmt/bin_to_hex.h +++ b/include/spdlog/fmt/bin_to_hex.h @@ -10,7 +10,7 @@ // // Support for logging binary data as hex -// format flags, any combination of the followng: +// format flags, any combination of the following: // {:X} - print in uppercase. // {:s} - don't separate each byte with space. // {:p} - don't print the position on each line start. diff --git a/include/spdlog/sinks/daily_file_sink.h b/include/spdlog/sinks/daily_file_sink.h index fc552398..7221f0f3 100644 --- a/include/spdlog/sinks/daily_file_sink.h +++ b/include/spdlog/sinks/daily_file_sink.h @@ -50,7 +50,7 @@ struct daily_filename_format_calculator { // generate fmt datetime format string, e.g. {:%Y-%m-%d}. filename_t fmt_filename = fmt::format(SPDLOG_FILENAME_T("{{:{}}}"), filename); -#if defined(_MSC_VER) && defined(SPDLOG_WCHAR_FILENAMES) // for some reason msvc doesnt allow fmt::runtime(..) with wchar here +#if defined(_MSC_VER) && defined(SPDLOG_WCHAR_FILENAMES) // for some reason msvc doesn't allow fmt::runtime(..) with wchar here return fmt::format(fmt_filename, now_tm); #else return fmt::format(SPDLOG_FMT_RUNTIME(fmt_filename), now_tm); diff --git a/include/spdlog/sinks/stdout_sinks-inl.h b/include/spdlog/sinks/stdout_sinks-inl.h index c14066b9..fd5594fe 100644 --- a/include/spdlog/sinks/stdout_sinks-inl.h +++ b/include/spdlog/sinks/stdout_sinks-inl.h @@ -16,7 +16,7 @@ // so instead we use ::FileWrite # include -# ifndef _USING_V110_SDK71_ // fileapi.h doesnt exist in winxp +# ifndef _USING_V110_SDK71_ // fileapi.h doesn't exist in winxp # include // WriteFile (..) # endif @@ -60,7 +60,7 @@ SPDLOG_INLINE void stdout_sink_base::log(const details::log_msg &m std::lock_guard lock(mutex_); memory_buf_t formatted; formatter_->format(msg, formatted); - ::fflush(file_); // flush in case there is somthing in this file_ already + ::fflush(file_); // flush in case there is something in this file_ already auto size = static_cast(formatted.size()); DWORD bytes_written = 0; bool ok = ::WriteFile(handle_, formatted.data(), size, &bytes_written, nullptr) != 0; From c8ba643f53812470ad36776f8581d2465841cce8 Mon Sep 17 00:00:00 2001 From: Keith Williams Date: Sun, 14 Nov 2021 06:44:47 +0000 Subject: [PATCH 2/2] example.cpp failes to build on FreeBSD --- include/spdlog/details/udp_client.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/spdlog/details/udp_client.h b/include/spdlog/details/udp_client.h index ccdf2f0b..7a8ee9cc 100644 --- a/include/spdlog/details/udp_client.h +++ b/include/spdlog/details/udp_client.h @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -90,4 +91,4 @@ public: } }; } // namespace details -} // namespace spdlog \ No newline at end of file +} // namespace spdlog