From f8a6044dba1ac89082a82c1bdd62346e4602b5c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Fri, 18 Dec 2020 14:11:29 +0100 Subject: [PATCH] Avoid modern contract syntax. --- source/vibe/core/sync.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/vibe/core/sync.d b/source/vibe/core/sync.d index 9f29d4b..a636ace 100644 --- a/source/vibe/core/sync.d +++ b/source/vibe/core/sync.d @@ -132,7 +132,7 @@ struct ScopedMutexLock(M) @property bool locked() const { return m_locked; } void unlock() - in (this.locked) + in { assert(this.locked); } do { enforce(m_locked); m_mutex.unlock(); @@ -140,13 +140,13 @@ struct ScopedMutexLock(M) } bool tryLock() - in (!this.locked) + in { assert(!this.locked); } do { return m_locked = m_mutex.tryLock(); } void lock() - in (!this.locked) + in { assert(!this.locked); } do { m_locked = true; m_mutex.lock();