From 2df13450a03132fafb7ccda56397bb0b9600b97c Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sat, 16 Nov 2019 11:04:02 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Call=20overloads=20to=20reduce?= =?UTF-8?q?=20code=20duplication?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- X10D/Int16Extensions.cs | 4 ++-- X10D/Int32Extensions.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/X10D/Int16Extensions.cs b/X10D/Int16Extensions.cs index 29606c2..43723dc 100644 --- a/X10D/Int16Extensions.cs +++ b/X10D/Int16Extensions.cs @@ -120,7 +120,7 @@ /// Returns if is 0, /// otherwise. public static bool ToBoolean(this short value) => - value != 0; + ((long)value).ToBoolean(); /// /// Gets an boolean value that represents this integer. @@ -129,6 +129,6 @@ /// Returns if is 0, /// otherwise. public static bool ToBoolean(this ushort value) => - value != 0; + ((ulong)value).ToBoolean(); } } diff --git a/X10D/Int32Extensions.cs b/X10D/Int32Extensions.cs index 446b82e..fa98217 100644 --- a/X10D/Int32Extensions.cs +++ b/X10D/Int32Extensions.cs @@ -256,7 +256,7 @@ /// Returns if is 0, /// otherwise. public static bool ToBoolean(this int value) => - value != 0; + ((long)value).ToBoolean(); /// /// Gets an boolean value that represents this integer. @@ -265,6 +265,6 @@ /// Returns if is 0, /// otherwise. public static bool ToBoolean(this uint value) => - value != 0; + ((ulong)value).ToBoolean(); } }