Changed clang formatting for templates

This commit is contained in:
gabime
2018-03-16 17:13:50 +02:00
parent f4ce52d206
commit 5afb5dc782
29 changed files with 291 additions and 288 deletions

View File

@@ -13,7 +13,7 @@
// create logger with given name, sinks and the default pattern formatter
// all other ctors will call this one
template <class It>
template<class It>
inline spdlog::logger::logger(std::string logger_name, const It &begin, const It &end)
: _name(std::move(logger_name))
, _sinks(begin, end)
@@ -50,7 +50,7 @@ inline void spdlog::logger::set_pattern(const std::string &pattern, pattern_time
_set_pattern(pattern, pattern_time);
}
template <typename... Args> inline void spdlog::logger::log(level::level_enum lvl, const char *fmt, const Args &... args)
template<typename... Args> inline void spdlog::logger::log(level::level_enum lvl, const char *fmt, const Args &... args)
{
if (!should_log(lvl))
return;
@@ -77,7 +77,7 @@ template <typename... Args> inline void spdlog::logger::log(level::level_enum lv
}
}
template <typename... Args> inline void spdlog::logger::log(level::level_enum lvl, const char *msg)
template<typename... Args> inline void spdlog::logger::log(level::level_enum lvl, const char *msg)
{
if (!should_log(lvl))
return;
@@ -98,7 +98,7 @@ template <typename... Args> inline void spdlog::logger::log(level::level_enum lv
}
}
template <typename T> inline void spdlog::logger::log(level::level_enum lvl, const T &msg)
template<typename T> inline void spdlog::logger::log(level::level_enum lvl, const T &msg)
{
if (!should_log(lvl))
return;
@@ -119,62 +119,62 @@ template <typename T> inline void spdlog::logger::log(level::level_enum lvl, con
}
}
template <typename Arg1, typename... Args> inline void spdlog::logger::trace(const char *fmt, const Arg1 &arg1, const Args &... args)
template<typename Arg1, typename... Args> inline void spdlog::logger::trace(const char *fmt, const Arg1 &arg1, const Args &... args)
{
log(level::trace, fmt, arg1, args...);
}
template <typename Arg1, typename... Args> inline void spdlog::logger::debug(const char *fmt, const Arg1 &arg1, const Args &... args)
template<typename Arg1, typename... Args> inline void spdlog::logger::debug(const char *fmt, const Arg1 &arg1, const Args &... args)
{
log(level::debug, fmt, arg1, args...);
}
template <typename Arg1, typename... Args> inline void spdlog::logger::info(const char *fmt, const Arg1 &arg1, const Args &... args)
template<typename Arg1, typename... Args> inline void spdlog::logger::info(const char *fmt, const Arg1 &arg1, const Args &... args)
{
log(level::info, fmt, arg1, args...);
}
template <typename Arg1, typename... Args> inline void spdlog::logger::warn(const char *fmt, const Arg1 &arg1, const Args &... args)
template<typename Arg1, typename... Args> inline void spdlog::logger::warn(const char *fmt, const Arg1 &arg1, const Args &... args)
{
log(level::warn, fmt, arg1, args...);
}
template <typename Arg1, typename... Args> inline void spdlog::logger::error(const char *fmt, const Arg1 &arg1, const Args &... args)
template<typename Arg1, typename... Args> inline void spdlog::logger::error(const char *fmt, const Arg1 &arg1, const Args &... args)
{
log(level::err, fmt, arg1, args...);
}
template <typename Arg1, typename... Args> inline void spdlog::logger::critical(const char *fmt, const Arg1 &arg1, const Args &... args)
template<typename Arg1, typename... Args> inline void spdlog::logger::critical(const char *fmt, const Arg1 &arg1, const Args &... args)
{
log(level::critical, fmt, arg1, args...);
}
template <typename T> inline void spdlog::logger::trace(const T &msg)
template<typename T> inline void spdlog::logger::trace(const T &msg)
{
log(level::trace, msg);
}
template <typename T> inline void spdlog::logger::debug(const T &msg)
template<typename T> inline void spdlog::logger::debug(const T &msg)
{
log(level::debug, msg);
}
template <typename T> inline void spdlog::logger::info(const T &msg)
template<typename T> inline void spdlog::logger::info(const T &msg)
{
log(level::info, msg);
}
template <typename T> inline void spdlog::logger::warn(const T &msg)
template<typename T> inline void spdlog::logger::warn(const T &msg)
{
log(level::warn, msg);
}
template <typename T> inline void spdlog::logger::error(const T &msg)
template<typename T> inline void spdlog::logger::error(const T &msg)
{
log(level::err, msg);
}
template <typename T> inline void spdlog::logger::critical(const T &msg)
template<typename T> inline void spdlog::logger::critical(const T &msg)
{
log(level::critical, msg);
}
@@ -183,14 +183,14 @@ template <typename T> inline void spdlog::logger::critical(const T &msg)
#include <codecvt>
#include <locale>
template <typename... Args> inline void spdlog::logger::log(level::level_enum lvl, const wchar_t *msg)
template<typename... Args> inline void spdlog::logger::log(level::level_enum lvl, const wchar_t *msg)
{
std::wstring_convert<std::codecvt_utf8<wchar_t>> conv;
log(lvl, conv.to_bytes(msg));
}
template <typename... Args> inline void spdlog::logger::log(level::level_enum lvl, const wchar_t *fmt, const Args &... args)
template<typename... Args> inline void spdlog::logger::log(level::level_enum lvl, const wchar_t *fmt, const Args &... args)
{
fmt::WMemoryWriter wWriter;
@@ -198,32 +198,32 @@ template <typename... Args> inline void spdlog::logger::log(level::level_enum lv
log(lvl, wWriter.c_str());
}
template <typename... Args> inline void spdlog::logger::trace(const wchar_t *fmt, const Args &... args)
template<typename... Args> inline void spdlog::logger::trace(const wchar_t *fmt, const Args &... args)
{
log(level::trace, fmt, args...);
}
template <typename... Args> inline void spdlog::logger::debug(const wchar_t *fmt, const Args &... args)
template<typename... Args> inline void spdlog::logger::debug(const wchar_t *fmt, const Args &... args)
{
log(level::debug, fmt, args...);
}
template <typename... Args> inline void spdlog::logger::info(const wchar_t *fmt, const Args &... args)
template<typename... Args> inline void spdlog::logger::info(const wchar_t *fmt, const Args &... args)
{
log(level::info, fmt, args...);
}
template <typename... Args> inline void spdlog::logger::warn(const wchar_t *fmt, const Args &... args)
template<typename... Args> inline void spdlog::logger::warn(const wchar_t *fmt, const Args &... args)
{
log(level::warn, fmt, args...);
}
template <typename... Args> inline void spdlog::logger::error(const wchar_t *fmt, const Args &... args)
template<typename... Args> inline void spdlog::logger::error(const wchar_t *fmt, const Args &... args)
{
log(level::err, fmt, args...);
}
template <typename... Args> inline void spdlog::logger::critical(const wchar_t *fmt, const Args &... args)
template<typename... Args> inline void spdlog::logger::critical(const wchar_t *fmt, const Args &... args)
{
log(level::critical, fmt, args...);
}