mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 02:19:35 +08:00
Fix some typos
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -56,7 +56,7 @@
|
||||
#include <thread.h> // for thr_self
|
||||
#endif
|
||||
|
||||
#endif // unix
|
||||
#endif // _WIN32
|
||||
|
||||
#if defined __APPLE__
|
||||
#include <AvailabilityMacros.h>
|
||||
|
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user