public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Iain Buclaw <ibuclaw@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/ibuclaw/heads/darwin)] libphobos: Fix mcontext_t definitions for Darwin
Date: Mon, 19 Apr 2021 18:06:08 +0000 (GMT)	[thread overview]
Message-ID: <20210419180608.77361395B452@sourceware.org> (raw)

https://gcc.gnu.org/g:9413e61de0c1398c56b87799ba78be7e59597068

commit 9413e61de0c1398c56b87799ba78be7e59597068
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);
     }


             reply	other threads:[~2021-04-19 18:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-19 18:06 Iain Buclaw [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-09-17 14:34 Iain Buclaw
2021-04-10 17:01 Iain Buclaw
2021-04-10 15:04 Iain Buclaw
2021-03-14 22:00 Iain Buclaw
2021-03-07 17:01 Iain Buclaw
2021-01-30 19:08 Iain Buclaw
2021-01-28 17:32 Iain Buclaw
2021-01-11 11:39 Iain Buclaw
2020-12-22 13:41 Iain Buclaw
2020-12-09  9:51 Iain Buclaw
2020-12-07 23:13 Iain Buclaw
2020-12-07 14:42 Iain Buclaw

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210419180608.77361395B452@sourceware.org \
    --to=ibuclaw@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).