Simplify debug::Log. No need for a second function
This commit is contained in:
+2
-10
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user