Use std::shared_ptr instead of std::unique_ptr for Platform::TimerRef.
We currently support MSVC 2013, and MSVC 2013 has weird bugs around std::unique_ptr; the one we hit is Connect ID 858243. You can't actually open the bug report anymore because Microsoft has shut down Microsoft Connect. We probably shouldn't support a compiler so old its bugtracker doesn't exist anymore, but there isn't any very good reason to use unique_ptr for TimerRef either, so let's change that for the time being.pull/339/head
parent
a738e3f82e
commit
4f52167a78
|
@ -140,7 +140,7 @@ public:
|
||||||
virtual void RunAfterProcessingEvents() { RunAfter(0); }
|
virtual void RunAfterProcessingEvents() { RunAfter(0); }
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::unique_ptr<Timer> TimerRef;
|
typedef std::shared_ptr<Timer> TimerRef;
|
||||||
|
|
||||||
TimerRef CreateTimer();
|
TimerRef CreateTimer();
|
||||||
|
|
||||||
|
|
|
@ -218,7 +218,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
TimerRef CreateTimer() {
|
TimerRef CreateTimer() {
|
||||||
return std::unique_ptr<TimerImplGtk>(new TimerImplGtk);
|
return std::make_shared<TimerImplGtk>();
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -187,7 +187,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
TimerRef CreateTimer() {
|
TimerRef CreateTimer() {
|
||||||
return std::unique_ptr<TimerImplCocoa>(new TimerImplCocoa);
|
return std::make_shared<TimerImplCocoa>();
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -89,7 +89,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
TimerRef CreateTimer() {
|
TimerRef CreateTimer() {
|
||||||
return std::unique_ptr<Timer>(new TimerImplDummy);
|
return std::make_shared<TimerImplDummy>();
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -258,7 +258,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
TimerRef CreateTimer() {
|
TimerRef CreateTimer() {
|
||||||
return std::unique_ptr<TimerImplWin32>(new TimerImplWin32);
|
return std::make_shared<TimerImplWin32>();
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue