Fix deprecation warnings on DMD 2.082.0

This commit is contained in:
Sönke Ludwig 2018-10-06 10:27:30 +02:00
parent dacd12ed99
commit eae11d3ba3
2 changed files with 2 additions and 1 deletions

View file

@ -153,7 +153,7 @@ struct ScopedLock(T)
*/
@property inout(T) unsafeGet() inout nothrow { return m_ref; }
inout(T) opDot() inout nothrow { return m_ref; }
alias unsafeGet this;
//pragma(msg, "In ScopedLock!("~T.stringof~")");
//pragma(msg, isolatedRefMethods!T());
// mixin(isolatedAggregateMethodsString!T());

View file

@ -689,6 +689,7 @@ void hibernate(scope void delegate() @safe nothrow on_interrupt = null)
*/
void switchToTask(Task t)
@safe nothrow {
import std.typecons : Yes, No;
auto defer = TaskFiber.getThis().m_yieldLockCount > 0 ? Yes.defer : No.defer;
s_scheduler.switchTo(t, defer);
}