Avoid modern contract syntax.
This commit is contained in:
parent
ade765d6bd
commit
f8a6044dba
|
@ -132,7 +132,7 @@ struct ScopedMutexLock(M)
|
||||||
@property bool locked() const { return m_locked; }
|
@property bool locked() const { return m_locked; }
|
||||||
|
|
||||||
void unlock()
|
void unlock()
|
||||||
in (this.locked)
|
in { assert(this.locked); }
|
||||||
do {
|
do {
|
||||||
enforce(m_locked);
|
enforce(m_locked);
|
||||||
m_mutex.unlock();
|
m_mutex.unlock();
|
||||||
|
@ -140,13 +140,13 @@ struct ScopedMutexLock(M)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool tryLock()
|
bool tryLock()
|
||||||
in (!this.locked)
|
in { assert(!this.locked); }
|
||||||
do {
|
do {
|
||||||
return m_locked = m_mutex.tryLock();
|
return m_locked = m_mutex.tryLock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void lock()
|
void lock()
|
||||||
in (!this.locked)
|
in { assert(!this.locked); }
|
||||||
do {
|
do {
|
||||||
m_locked = true;
|
m_locked = true;
|
||||||
m_mutex.lock();
|
m_mutex.lock();
|
||||||
|
|
Loading…
Reference in a new issue