Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gabime/spdlog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgabime <gmelman1@gmail.comx>2022-10-31 18:09:45 +0300
committergabime <gmelman1@gmail.comx>2022-10-31 18:09:45 +0300
commit070dd181df89bbdcb26e344c21ede5bc857f555d (patch)
treee83d1ab155871ba0149bae55e785b6b9222c5751
parent7147da468f355d00225cededdba1d02a8c7e67ec (diff)
clang format
-rw-r--r--example/example.cpp5
-rw-r--r--include/spdlog/details/periodic_worker.h3
-rw-r--r--include/spdlog/spdlog.h5
-rw-r--r--tests/includes.h11
-rw-r--r--tests/main.cpp10
5 files changed, 17 insertions, 17 deletions
diff --git a/example/example.cpp b/example/example.cpp
index b348afb9..f7b4572b 100644
--- a/example/example.cpp
+++ b/example/example.cpp
@@ -262,13 +262,12 @@ struct my_type
: i(i){};
};
-
// Using a namespace alias like fmt_lib is not allowed when extending an existing namespace,
// but the correct namespace can still be selected with the SPDLOG_USE_STD_FORMAT macro.
#ifdef SPDLOG_USE_STD_FORMAT
- namespace std {
+namespace std {
#else
- namespace fmt {
+namespace fmt {
#endif
template<>
struct formatter<my_type> : formatter<std::string>
diff --git a/include/spdlog/details/periodic_worker.h b/include/spdlog/details/periodic_worker.h
index 919ba7ed..d7d69b28 100644
--- a/include/spdlog/details/periodic_worker.h
+++ b/include/spdlog/details/periodic_worker.h
@@ -21,7 +21,8 @@ class SPDLOG_API periodic_worker
{
public:
template<typename Rep, typename Period>
- periodic_worker(const std::function<void()> &callback_fun, std::chrono::duration<Rep, Period> interval) {
+ periodic_worker(const std::function<void()> &callback_fun, std::chrono::duration<Rep, Period> interval)
+ {
active_ = (interval > std::chrono::duration<Rep, Period>::zero());
if (!active_)
{
diff --git a/include/spdlog/spdlog.h b/include/spdlog/spdlog.h
index 40c2bcad..ee83e8de 100644
--- a/include/spdlog/spdlog.h
+++ b/include/spdlog/spdlog.h
@@ -293,9 +293,10 @@ inline void critical(const T &msg)
//
#ifndef SPDLOG_NO_SOURCE_LOC
-#define SPDLOG_LOGGER_CALL(logger, level, ...) (logger)->log(spdlog::source_loc{__FILE__, __LINE__, SPDLOG_FUNCTION}, level, __VA_ARGS__)
+# define SPDLOG_LOGGER_CALL(logger, level, ...) \
+ (logger)->log(spdlog::source_loc{__FILE__, __LINE__, SPDLOG_FUNCTION}, level, __VA_ARGS__)
#else
-#define SPDLOG_LOGGER_CALL(logger, level, ...) (logger)->log(spdlog::source_loc{}, level, __VA_ARGS__)
+# define SPDLOG_LOGGER_CALL(logger, level, ...) (logger)->log(spdlog::source_loc{}, level, __VA_ARGS__)
#endif
#if SPDLOG_ACTIVE_LEVEL <= SPDLOG_LEVEL_TRACE
diff --git a/tests/includes.h b/tests/includes.h
index 155ae78d..16394440 100644
--- a/tests/includes.h
+++ b/tests/includes.h
@@ -1,13 +1,12 @@
#pragma once
-
-#if defined (__GNUC__) && __GNUC__ == 12
-# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-Wmaybe-uninitialized" // Workaround for GCC 12
+#if defined(__GNUC__) && __GNUC__ == 12
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wmaybe-uninitialized" // Workaround for GCC 12
#endif
#include "catch.hpp"
-#if defined (__GNUC__) && __GNUC__ == 12
-# pragma GCC diagnostic pop
+#if defined(__GNUC__) && __GNUC__ == 12
+# pragma GCC diagnostic pop
#endif
#include "utils.h"
diff --git a/tests/main.cpp b/tests/main.cpp
index 4f0be406..f8ed5192 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -1,11 +1,11 @@
-#if defined (__GNUC__) && __GNUC__ == 12
-# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-Wmaybe-uninitialized" // Workaround for GCC 12
+#if defined(__GNUC__) && __GNUC__ == 12
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wmaybe-uninitialized" // Workaround for GCC 12
#endif
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
-#if defined (__GNUC__) && __GNUC__ == 12
-# pragma GCC diagnostic pop
+#if defined(__GNUC__) && __GNUC__ == 12
+# pragma GCC diagnostic pop
#endif