1
0
mirror of https://github.com/gabime/spdlog.git synced 2025-03-31 02:12:40 +08:00

clang-format

This commit is contained in:
gabime 2018-11-21 16:02:02 +02:00
parent 70d03fd9c3
commit 50648553cf
4 changed files with 14 additions and 20 deletions

View File

@ -21,7 +21,6 @@ void bench_scoped_pad(benchmark::State &state, size_t wrapped_size, spdlog::deta
}
}
void bench_formatter(benchmark::State &state, std::string pattern)
{
auto formatter = spdlog::details::make_unique<spdlog::pattern_formatter>(pattern);
@ -29,7 +28,6 @@ void bench_formatter(benchmark::State &state, std::string pattern)
std::string logger_name = "logger-name";
const char *text = "Hello. This is some message with length of 80 ";
spdlog::details::log_msg msg(&logger_name, spdlog::level::info, text);
// formatter->format(msg, dest);
// printf("%s\n", fmt::to_string(dest).c_str());
@ -60,7 +58,6 @@ void bench_formatters()
benchmark::RegisterBenchmark(pattern.c_str(), bench_formatter, pattern);
}
// complex patterns
std::vector<std::string> patterns = {
"[%D %X] [%l] [%n] %v",
@ -73,7 +70,6 @@ void bench_formatters()
}
}
int main(int argc, char *argv[])
{
@ -89,4 +85,3 @@ int main(int argc, char *argv[])
benchmark::Initialize(&argc, argv);
benchmark::RunSpecifiedBenchmarks();
}

View File

@ -383,7 +383,6 @@ inline int pid()
#endif
}
// Determine if the terminal supports colors
// Source: https://github.com/agauniyal/rang/
inline bool is_color_terminal() SPDLOG_NOEXCEPT

View File

@ -729,7 +729,8 @@ public:
void format(const details::log_msg &msg, const std::tm &, fmt::memory_buffer &dest) override
{
if(padinfo_.width_) {
if (padinfo_.width_)
{
scoped_pad p(msg.payload, padinfo_, dest);
fmt_helper::append_string_view(msg.payload, dest);
}

View File

@ -303,7 +303,6 @@ inline void critical(const wchar_t *fmt, const Args &... args)
// SPDLOG_LEVEL_OFF
//
#if SPDLOG_ACTIVE_LEVEL <= SPDLOG_LEVEL_TRACE
#define SPDLOG_LOGGER_TRACE(logger, ...) logger->trace(__VA_ARGS__)
#define SPDLOG_TRACE(...) spdlog::trace(__VA_ARGS__)