[gcc(refs/users/iains/heads/d-for-darwin)] libphobos: Fix mcontext_t definitions for Darwin
Iain D Sandoe
iains@gcc.gnu.org
Fri Oct 15 19:33:56 GMT 2021
https://gcc.gnu.org/g:5a667586776e48a80ab95f3cbbe2138e95432049
commit 5a667586776e48a80ab95f3cbbe2138e95432049
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date: Mon Dec 7 15:42:09 2020 +0100
libphobos: Fix mcontext_t definitions for Darwin
Diff:
---
libphobos/src/std/datetime/package.d | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/libphobos/src/std/datetime/package.d b/libphobos/src/std/datetime/package.d
index 976d06ddb79..a5fd03d39e9 100644
--- a/libphobos/src/std/datetime/package.d
+++ b/libphobos/src/std/datetime/package.d
@@ -115,7 +115,6 @@ public import std.datetime.interval;
public import std.datetime.systime;
public import std.datetime.timezone;
-import core.exception : AssertError;
import std.functional : unaryFun;
import std.traits;
import std.typecons : Flag, Yes, No;
@@ -267,12 +266,7 @@ public:
StopWatch sw;
sw.start();
auto t1 = sw.peek();
- bool doublestart = true;
- try
- sw.start();
- catch (AssertError e)
- doublestart = false;
- assert(!doublestart);
+ assert(sw._flagStarted);
sw.stop();
assert((t1 - sw.peek()).to!("seconds", real)() <= 0);
}
@@ -294,12 +288,7 @@ public:
sw.start();
sw.stop();
auto t1 = sw.peek();
- bool doublestop = true;
- try
- sw.stop();
- catch (AssertError e)
- doublestop = false;
- assert(!doublestop);
+ assert(!sw._flagStarted);
assert((t1 - sw.peek()).to!("seconds", real)() == 0);
}
More information about the Gcc-cvs
mailing list