Simplify debug::Log. No need for a second function

This commit is contained in:
Rasmus Karlsson 2018-04-03 02:35:02 +02:00 committed by fourtf
parent b4a5ba541d
commit 1119c08182

View file

@ -8,19 +8,11 @@
namespace chatterino {
namespace debug {
namespace detail {
static void _log(const std::string &message)
{
qDebug().noquote() << QTime::currentTime().toString("hh:mm:ss.zzz") << message.c_str();
}
} // namespace detail
template <typename... Args>
inline void Log(const std::string &formatString, Args &&... args)
{
detail::_log(fS(formatString, std::forward<Args>(args)...));
qDebug().noquote() << QTime::currentTime().toString("hh:mm:ss.zzz")
<< fS(formatString, std::forward<Args>(args)...).c_str();
}
} // namespace debug