mirror-chatterino2/src/util/AssertInGuiThread.hpp
2018-06-26 13:24:55 +02:00

18 lines
326 B
C++

#pragma once
#include <QCoreApplication>
#include <QThread>
#include <cassert>
namespace chatterino {
namespace util {
static void assertInGuiThread()
{
#ifdef _DEBUG
assert(QCoreApplication::instance()->thread() == QThread::currentThread());
#endif
}
} // namespace util
} // namespace chatterino