Fix clang "unused type alias 'FType'" warning

This commit is contained in:
Simon Brunel 2018-04-26 16:06:10 +02:00
parent 50bae380be
commit dcbb2ef860

View File

@ -34,9 +34,10 @@ namespace QtPromisePrivate {
template <typename F> template <typename F>
static void qtpromise_defer(F&& f, const QPointer<QThread>& thread) static void qtpromise_defer(F&& f, const QPointer<QThread>& thread)
{ {
using FType = typename std::decay<F>::type;
struct Event : public QEvent struct Event : public QEvent
{ {
using FType = typename std::decay<F>::type;
Event(FType&& f) : QEvent(QEvent::None), m_f(std::move(f)) { } Event(FType&& f) : QEvent(QEvent::None), m_f(std::move(f)) { }
Event(const FType& f) : QEvent(QEvent::None), m_f(f) { } Event(const FType& f) : QEvent(QEvent::None), m_f(f) { }
~Event() { m_f(); } ~Event() { m_f(); }