From 8c0e075122ee471cdede7fd1b1f85eaa77690861 Mon Sep 17 00:00:00 2001 From: Ian Harrigan Date: Tue, 30 Jan 2024 11:01:19 +0100 Subject: [PATCH] Revert "Merge pull request #572 from Jarrio/master" This reverts commit 5b2d5b8e7e470cf637953e1369c80a1f42016a75, reversing changes made to 1a3850ed724aca86b475d0d408f5247319cb05d4. --- haxe/ui/components/Range.hx | 4 ++-- haxe/ui/util/Variant.hx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/haxe/ui/components/Range.hx b/haxe/ui/components/Range.hx index b6659e8c9..6c71ebca4 100644 --- a/haxe/ui/components/Range.hx +++ b/haxe/ui/components/Range.hx @@ -158,7 +158,7 @@ private class RangeEnd extends DataBehaviour { @:access(haxe.ui.core.Component) private class AllowInteraction extends DefaultBehaviour { public override function get():Variant { - return (cast _component._internalEvents != null); + return (_component._internalEvents != null); } public override function set(value:Variant) { @@ -266,4 +266,4 @@ class RangeBuilder extends CompositeBuilder { var name = _component.className.split(".").pop(); trace("WARNING: trying to create an instance of '" + name + "' directly, use either 'Horizontal" + name + "' or 'Vertical" + name + "'"); } -} +} \ No newline at end of file diff --git a/haxe/ui/util/Variant.hx b/haxe/ui/util/Variant.hx index b31563db8..02f6768e1 100644 --- a/haxe/ui/util/Variant.hx +++ b/haxe/ui/util/Variant.hx @@ -356,7 +356,7 @@ abstract Variant(VariantType) from VariantType { @:op(A * B) private function multiply(rhs:Variant):Variant { if (isNumber && rhs.isNumber) { - return cast(toNumber() * rhs.toNumber()); + return toNumber() * rhs.toNumber(); } throw "Variant operation error"; @@ -365,7 +365,7 @@ abstract Variant(VariantType) from VariantType { @:op(A / B) private function divide(rhs:Variant):Variant { if (isNumber && rhs.isNumber) { - return cast(toNumber() / rhs.toNumber()); + return toNumber() / rhs.toNumber(); } throw "Variant operation error";