mirror of
https://github.com/simonbrunel/qtpromise.git
synced 2024-11-25 12:11:28 +08:00
Fix clang "unused type alias 'FType'" warning
This commit is contained in:
parent
50bae380be
commit
dcbb2ef860
@ -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(); }
|
||||||
|
Loading…
Reference in New Issue
Block a user