Fix some typos

This commit is contained in:
gabime
2024-01-13 18:53:19 +02:00
parent c539f36551
commit ce3922cff1
7 changed files with 8 additions and 9 deletions

View File

@@ -12,7 +12,7 @@ spdlog::level level_from_str(const std::string &name) noexcept {
auto it = std::find(std::begin(level_string_views), std::end(level_string_views), name);
if (it != std::end(level_string_views)) return static_cast<level>(std::distance(std::begin(level_string_views), it));
// check also for "warn" and "err" before giving up..
// check also for "warn" and "err" before giving up
if (name == "warn") {
return spdlog::level::warn;
}

View File

@@ -56,7 +56,7 @@
#include <thread.h> // for thr_self
#endif
#endif // unix
#endif // _WIN32
#if defined __APPLE__
#include <AvailabilityMacros.h>

View File

@@ -40,7 +40,7 @@ stdout_sink_base<Mutex>::stdout_sink_base(FILE *file)
if (handle_ == INVALID_HANDLE_VALUE && file != stdout && file != stderr) {
throw_spdlog_ex("spdlog::stdout_sink_base: _get_osfhandle() failed", errno);
}
#endif // WIN32
#endif // _WIN32
}
template <typename Mutex>
@@ -62,7 +62,7 @@ void stdout_sink_base<Mutex>::sink_it_(const details::log_msg &msg) {
memory_buf_t formatted;
base_sink<Mutex>::formatter_->format(msg, formatted);
::fwrite(formatted.data(), sizeof(char), formatted.size(), file_);
#endif // WIN32
#endif // _WIN32
::fflush(file_); // flush every line to terminal
}