This commit is contained in:
gabime 2016-12-02 17:40:40 +02:00
parent 6d8efa8d7f
commit 5d23e88c16
4 changed files with 19 additions and 19 deletions

View File

@ -316,7 +316,7 @@ inline size_t _thread_id()
inline size_t thread_id()
{
static thread_local const size_t tid = _thread_id();
return tid;
return tid;
}
@ -364,7 +364,7 @@ inline std::string errno_str(int err_num)
#endif
}
inline int pid()
inline int pid()
{
#ifdef _WIN32

View File

@ -365,12 +365,12 @@ class t_formatter:public flag_formatter
}
};
// Current pid
// Current pid
class pid_formatter:public flag_formatter
{
void format(details::log_msg& msg, const std::tm&) override
{
msg.formatted << details::os::pid();
msg.formatted << details::os::pid();
}
};
@ -507,7 +507,7 @@ inline void spdlog::pattern_formatter::handle_flag(char flag)
{
switch (flag)
{
// logger name
// logger name
case 'n':
_formatters.push_back(std::unique_ptr<details::flag_formatter>(new details::name_formatter()));
break;

View File

@ -475,7 +475,7 @@ template <typename Impl, typename Char>
class BasicPrintfArgFormatter;
template <typename CharType,
typename ArgFormatter = fmt::ArgFormatter<CharType> >
typename ArgFormatter = fmt::ArgFormatter<CharType> >
class BasicFormatter;
/**
@ -2647,15 +2647,15 @@ inline uint64_t make_type(const T &arg)
}
template <unsigned N, bool/*IsPacked*/ = (N < ArgList::MAX_PACKED_ARGS)>
struct ArgArray;
struct ArgArray;
template <unsigned N>
struct ArgArray<N, true/*IsPacked*/>
{
typedef Value Type[N > 0 ? N : 1];
template <typename Formatter, typename T>
static Value make(const T &value)
template <typename Formatter, typename T>
static Value make(const T &value)
{
#ifdef __clang__
Value result = MakeValue<Formatter>(value);
@ -2667,7 +2667,7 @@ static Value make(const T &value)
return MakeValue<Formatter>(value);
#endif
}
};
};
template <unsigned N>
struct ArgArray<N, false/*IsPacked*/>
@ -3513,7 +3513,7 @@ void BasicWriter<Char>::write_double(T value, const FormatSpec &spec)
// MSVC's printf doesn't support 'F'.
type = 'f';
#endif
// Fall through.
// Fall through.
case 'E':
case 'G':
case 'A':
@ -4571,7 +4571,7 @@ struct UdlArg
template <typename T>
NamedArgWithType<Char, T> operator=(T &&value) const
{
return{ str, std::forward<T>(value) };
return { str, std::forward<T>(value) };
}
};
@ -4593,12 +4593,12 @@ std::string message = "The answer is {}"_format(42);
inline internal::UdlFormat<char>
operator"" _format(const char *s, std::size_t)
{
return{ s };
return { s };
}
inline internal::UdlFormat<wchar_t>
operator"" _format(const wchar_t *s, std::size_t)
{
return{ s };
return { s };
}
/**
@ -4614,12 +4614,12 @@ print("Elapsed time: {s:.2f} seconds", "s"_a=1.23);
inline internal::UdlArg<char>
operator"" _a(const char *s, std::size_t)
{
return{ s };
return { s };
}
inline internal::UdlArg<wchar_t>
operator"" _a(const wchar_t *s, std::size_t)
{
return{ s };
return { s };
}
} // inline namespace literals

View File

@ -66,7 +66,7 @@ public:
// change the color for the given level
void set_color(level::level_enum level, WORD color)
{
std::lock_guard<Mutex> lock(base_sink<Mutex>::_mutex);
std::lock_guard<Mutex> lock(base_sink<Mutex>::_mutex);
colors_[level] = color;
}
@ -91,7 +91,7 @@ template<class Mutex>
class wincolor_stdout_sink: public wincolor_sink<Mutex>
{
public:
wincolor_stdout_sink() : wincolor_sink<Mutex>(GetStdHandle(STD_OUTPUT_HANDLE))
wincolor_stdout_sink() : wincolor_sink<Mutex>(GetStdHandle(STD_OUTPUT_HANDLE))
{}
};
@ -105,7 +105,7 @@ template<class Mutex>
class wincolor_stderr_sink: public wincolor_sink<Mutex>
{
public:
wincolor_stderr_sink() : wincolor_sink<Mutex>(GetStdHandle(STD_ERROR_HANDLE))
wincolor_stderr_sink() : wincolor_sink<Mutex>(GetStdHandle(STD_ERROR_HANDLE))
{}
};