From 31960cd3e40b60d1c2c05f567fa6fadf918a6635 Mon Sep 17 00:00:00 2001 From: SomeGuyWhoLovesCoding <99929173+SomeGuyWhoLovesCoding@users.noreply.github.com> Date: Sun, 1 Sep 2024 23:00:23 -0400 Subject: [PATCH] Update Int64.hx --- std/haxe/Int64.hx | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/std/haxe/Int64.hx b/std/haxe/Int64.hx index 4bebe90675a..25896103956 100644 --- a/std/haxe/Int64.hx +++ b/std/haxe/Int64.hx @@ -229,34 +229,30 @@ abstract Int64(__Int64) from __Int64 to __Int64 { @:op(++A) private inline function preIncrement():Int64 { this = copy(); - ++this.low; + this.low++; if (this.low == 0) - ++this.high; + this.high++; return cast this; } @:op(A++) private inline function postIncrement():Int64 { - this = copy(); - this.low++; - if (this.low == 0) - this.high++; - return cast this; + var ret = this; + preIncrement(); + return ret; } @:op(--A) private inline function preDecrement():Int64 { this = copy(); if (this.low == 0) - --this.high; - --this.low; + this.high--; + this.low--; return cast this; } @:op(A--) private inline function postDecrement():Int64 { - this = copy(); - if (this.low == 0) - this.high--; - this.low--; - return cast this; + var ret = this; + preDecrement(); + return ret; } /**