From ac317aa9d62792e24feb3f094aa427935e3addf8 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 17 Nov 2017 17:51:06 +0100 Subject: [PATCH] math.min: Drop useless second isFloatingPoint check --- source/tanya/math/mp.d | 2 +- source/tanya/math/package.d | 4 ++-- source/tanya/memory/smartref.d | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/tanya/math/mp.d b/source/tanya/math/mp.d index 59c2baf..a045b25 100644 --- a/source/tanya/math/mp.d +++ b/source/tanya/math/mp.d @@ -15,7 +15,7 @@ module tanya.math.mp; import std.algorithm.comparison; -import std.algorithm.mutation : fill, copy, reverse; +import std.algorithm.mutation : copy, fill, reverse; import std.range; import tanya.algorithm.mutation; import tanya.container.array; diff --git a/source/tanya/math/package.d b/source/tanya/math/package.d index a78504d..d52cbbb 100644 --- a/source/tanya/math/package.d +++ b/source/tanya/math/package.d @@ -768,7 +768,7 @@ if (isIntegral!T) /// ditto T min(T)(T x, T y) -if (isFloatingPoint!T && isFloatingPoint!T) +if (isFloatingPoint!T) { if (isNaN(x)) { @@ -838,7 +838,7 @@ if (isIntegral!T) /// ditto T max(T)(T x, T y) -if (isFloatingPoint!T && isFloatingPoint!T) +if (isFloatingPoint!T) { if (isNaN(x)) { diff --git a/source/tanya/memory/smartref.d b/source/tanya/memory/smartref.d index 25a16d3..30c60e0 100644 --- a/source/tanya/memory/smartref.d +++ b/source/tanya/memory/smartref.d @@ -611,7 +611,7 @@ body @nogc @system unittest { - static bool destroyed = false; + static bool destroyed; static struct F { @@ -812,7 +812,7 @@ struct Unique(T) /// @nogc nothrow @system unittest { - static bool destroyed = false; + static bool destroyed; static struct F {