mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Simplify debug::Log. No need for a second function
This commit is contained in:
parent
b4a5ba541d
commit
1119c08182
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue