mirror of
https://github.com/gabime/spdlog.git
synced 2025-10-02 11:29:01 +08:00
clang format and SPLDOG_HEADER_ONLY macro
This commit is contained in:
@@ -35,8 +35,7 @@ public:
|
||||
explicit android_sink(std::string tag = "spdlog", bool use_raw_msg = false)
|
||||
: tag_(std::move(tag))
|
||||
, use_raw_msg_(use_raw_msg)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
protected:
|
||||
void sink_it_(const details::log_msg &msg) override
|
||||
|
@@ -89,6 +89,6 @@ using ansicolor_stderr_sink_st = ansicolor_sink<details::console_stderr, details
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
||||
#ifndef SPDLOG_STATIC_LIB
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
#include "ansicolor_sink-inl.h"
|
||||
#endif
|
@@ -22,8 +22,7 @@ public:
|
||||
explicit ostream_sink(std::ostream &os, bool force_flush = false)
|
||||
: ostream_(os)
|
||||
, force_flush_(force_flush)
|
||||
{
|
||||
}
|
||||
{}
|
||||
ostream_sink(const ostream_sink &) = delete;
|
||||
ostream_sink &operator=(const ostream_sink &) = delete;
|
||||
|
||||
|
@@ -8,13 +8,11 @@
|
||||
|
||||
SPDLOG_INLINE spdlog::sinks::sink::sink()
|
||||
: formatter_{details::make_unique<spdlog::pattern_formatter>()}
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
SPDLOG_INLINE spdlog::sinks::sink::sink(std::unique_ptr<spdlog::formatter> formatter)
|
||||
: formatter_{std::move(formatter)}
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
SPDLOG_INLINE bool spdlog::sinks::sink::should_log(spdlog::level::level_enum msg_level) const
|
||||
{
|
||||
|
@@ -38,6 +38,6 @@ protected:
|
||||
} // namespace sinks
|
||||
} // namespace spdlog
|
||||
|
||||
#ifndef SPDLOG_STATIC_LIB
|
||||
#ifdef SPDLOG_HEADER_ONLY
|
||||
#include "sink-inl.h"
|
||||
#endif
|
||||
|
@@ -26,8 +26,7 @@ public:
|
||||
stdout_sink()
|
||||
: mutex_(ConsoleMutex::mutex())
|
||||
, file_(TargetStream::stream())
|
||||
{
|
||||
}
|
||||
{}
|
||||
~stdout_sink() override = default;
|
||||
|
||||
stdout_sink(const stdout_sink &other) = delete;
|
||||
|
Reference in New Issue
Block a user