From c8e4be954ee54108cd6a85734b37fde9bb4626f7 Mon Sep 17 00:00:00 2001 From: Fall <73458244+Fallbork@users.noreply.github.com> Date: Thu, 26 May 2022 22:10:29 -0300 Subject: [PATCH] Update CBool.cs Left-handed and Right-handed operators were redundant due to previous casts. Also added the subtraction operation which I had forgotten. --- Raylib-cs/types/native/CBool.cs | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/Raylib-cs/types/native/CBool.cs b/Raylib-cs/types/native/CBool.cs index 2bcdf2d..d3a8e5f 100644 --- a/Raylib-cs/types/native/CBool.cs +++ b/Raylib-cs/types/native/CBool.cs @@ -56,24 +56,18 @@ namespace Raylib_cs * to a native boolean or integer, or a CBool. */ - // Between CBools + // Addition public static CBool operator +(CBool left, CBool right) { return new CBool { value = (sbyte)(left.value + right.value) }; } + + // Subtraction + public static CBool operator -(CBool left, CBool right) + { + return new CBool { value = (sbyte)(left.value - right.value) }; + } - // Left-hand CBool - public static CBool operator +(CBool left, bool right) - { - return new CBool { value = (sbyte)(left.value + (right ? 1 : 0)) }; - } - - // Right-hand CBool - public static CBool operator +(bool left, CBool right) - { - return new CBool { value = (sbyte)((left ? 1 : 0) + right.value) }; - } - // ToString override public override string ToString() {