Skip to content

Commit

Permalink
Update Int128.hx
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeGuyWhoLovesCoding authored Sep 2, 2024
1 parent 31960cd commit 0b357bc
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions std/haxe/Int128.hx
Original file line number Diff line number Diff line change
Expand Up @@ -235,34 +235,30 @@ abstract Int128(__Int128) from __Int128 to __Int128 {

@:op(++A) private inline function preIncrement():Int128 {
this = copy();
++this.low;
this.low++;
if (this.low == 0)
++this.high;
this.high++;
return cast this;
}

@:op(A++) private inline function postIncrement():Int128 {
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():Int128 {
this = copy();
if (this.low == 0)
--this.high;
--this.low;
this.high--;
this.low--;
return cast this;
}

@:op(A--) private inline function postDecrement():Int128 {
this = copy();
if (this.low == 0)
this.high--;
this.low--;
return cast this;
var ret = this;
preDecrement();
return ret;
}

/**
Expand Down

0 comments on commit 0b357bc

Please sign in to comment.