clang-format

This commit is contained in:
gabime 2019-06-18 17:05:27 +03:00
parent 38888ba5b3
commit 78c833a09f
8 changed files with 208 additions and 223 deletions

View File

@ -26,13 +26,11 @@
#include <windows.h>
#endif //_WIN32
#if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT)
#include <codecvt>
#include <locale>
#endif
#ifdef SPDLOG_COMPILED_LIB
#undef SPDLOG_HEADER_ONLY
#define SPDLOG_INLINE

View File

@ -6,7 +6,6 @@
#include "spdlog/details/null_mutex.h"
#include <mutex>
namespace spdlog {
namespace details {

View File

@ -13,24 +13,21 @@
namespace spdlog {
// public methods
SPDLOG_INLINE logger::logger(const logger &other):
name_(other.name_),
sinks_(other.sinks_),
level_(other.level_.load(std::memory_order_relaxed)),
flush_level_(other.flush_level_.load(std::memory_order_relaxed)),
custom_err_handler_(other.custom_err_handler_)
{
}
SPDLOG_INLINE logger::logger(logger &&other):
name_(std::move(other.name_)),
sinks_(std::move(other.sinks_)),
level_(other.level_.load(std::memory_order_relaxed)),
flush_level_(other.flush_level_.load(std::memory_order_relaxed)),
custom_err_handler_(std::move(other.custom_err_handler_))
{
}
SPDLOG_INLINE logger::logger(const logger &other)
: name_(other.name_)
, sinks_(other.sinks_)
, level_(other.level_.load(std::memory_order_relaxed))
, flush_level_(other.flush_level_.load(std::memory_order_relaxed))
, custom_err_handler_(other.custom_err_handler_)
{}
SPDLOG_INLINE logger::logger(logger &&other)
: name_(std::move(other.name_))
, sinks_(std::move(other.sinks_))
, level_(other.level_.load(std::memory_order_relaxed))
, flush_level_(other.flush_level_.load(std::memory_order_relaxed))
, custom_err_handler_(std::move(other.custom_err_handler_))
{}
SPDLOG_INLINE logger &logger::operator=(logger other)
{
@ -56,7 +53,6 @@ namespace spdlog {
custom_err_handler_.swap(other.custom_err_handler_);
}
SPDLOG_INLINE void swap(logger &a, logger &b)
{
a.swap(b);

View File

@ -350,7 +350,6 @@ void swap(logger& a, logger& b);
} // namespace spdlog
#ifdef SPDLOG_HEADER_ONLY
#include "logger-inl.h"
#endif

View File

@ -77,7 +77,6 @@ private:
void print_range_(const fmt::memory_buffer &formatted, size_t start, size_t end);
};
template<typename ConsoleMutex>
class ansicolor_stdout_sink : public ansicolor_sink<ConsoleMutex>
{
@ -92,7 +91,6 @@ public:
explicit ansicolor_stderr_sink(color_mode mode = color_mode::automatic);
};
using ansicolor_stdout_sink_mt = ansicolor_stdout_sink<details::console_mutex>;
using ansicolor_stdout_sink_st = ansicolor_stdout_sink<details::console_nullmutex>;

View File

@ -125,7 +125,6 @@ void SPDLOG_INLINE wincolor_sink<ConsoleMutex>::print_range_(const fmt::memory_b
::WriteConsoleA(out_handle_, formatted.data() + start, size, nullptr, nullptr);
}
// wincolor_stdout_sink
template<typename ConsoleMutex>
SPDLOG_INLINE wincolor_stdout_sink<ConsoleMutex>::wincolor_stdout_sink(color_mode mode)
@ -138,6 +137,5 @@ SPDLOG_INLINE wincolor_stderr_sink<ConsoleMutex>::wincolor_stderr_sink(color_mod
: wincolor_sink<ConsoleMutex>(::GetStdHandle(STD_ERROR_HANDLE), mode)
{}
} // namespace sinks
} // namespace spdlog

View File

@ -264,8 +264,6 @@ static const char *test_path = "\\a\\b\\myfile.cpp";
static const char *test_path = "/a/b//myfile.cpp";
#endif
TEST_CASE("short filename formatter-1", "[pattern_formatter]")
{
spdlog::pattern_formatter formatter("%s", spdlog::pattern_time_type::local, "");
@ -309,4 +307,3 @@ TEST_CASE("full filename formatter", "[pattern_formatter]")
formatter.format(msg, formatted);
REQUIRE(fmt::to_string(formatted) == test_path);
}