Skip to content

Commit

Permalink
Merge pull request #572 from Jarrio/master
Browse files Browse the repository at this point in the history
A couple of casts to be compatible with haxe nightly
  • Loading branch information
ianharrigan authored Jan 25, 2024
2 parents 1a3850e + 9f81b44 commit 5b2d5b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions haxe/ui/components/Range.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (_component._internalEvents != null);
return (cast _component._internalEvents != null);
}

public override function set(value:Variant) {
Expand Down Expand Up @@ -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 + "'");
}
}
}
4 changes: 2 additions & 2 deletions haxe/ui/util/Variant.hx
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ abstract Variant(VariantType) from VariantType {
@:op(A * B)
private function multiply(rhs:Variant):Variant {
if (isNumber && rhs.isNumber) {
return toNumber() * rhs.toNumber();
return cast(toNumber() * rhs.toNumber());
}

throw "Variant operation error";
Expand All @@ -365,7 +365,7 @@ abstract Variant(VariantType) from VariantType {
@:op(A / B)
private function divide(rhs:Variant):Variant {
if (isNumber && rhs.isNumber) {
return toNumber() / rhs.toNumber();
return cast(toNumber() / rhs.toNumber());
}

throw "Variant operation error";
Expand Down

0 comments on commit 5b2d5b8

Please sign in to comment.