Skip to content

Commit 6ae8081

Browse files
committed
Remove calls to trap-method in all places where deemed unneeded
1 parent a67e66e commit 6ae8081

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

arby/include/arby/arby.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ namespace com::saxbophone::arby {
277277
_digits.insert(_digits.begin(), 1);
278278
}
279279
}
280-
_trap_leading_zero();
281280
return *this; // return new value by reference
282281
}
283282
/**
@@ -403,7 +402,6 @@ namespace com::saxbophone::arby {
403402
while (_digits.size() > 0 and _digits.front() == 0) {
404403
_digits.erase(_digits.begin());
405404
}
406-
_trap_leading_zero();
407405
return *this; // return the result by reference
408406
}
409407
/**
@@ -453,7 +451,6 @@ namespace com::saxbophone::arby {
453451
}
454452
}
455453
}
456-
product._trap_leading_zero();
457454
return product;
458455
}
459456
private: // private helper methods for Uint::divmod()
@@ -528,8 +525,6 @@ namespace com::saxbophone::arby {
528525
// will be rhs without a shift, i.e. rhs * 1, subtraction of which from the remainder is guaranteed to
529526
// terminate.
530527
}
531-
quotient._trap_leading_zero();
532-
remainder._trap_leading_zero();
533528
return {quotient, remainder};
534529
}
535530
/**
@@ -604,7 +599,6 @@ namespace com::saxbophone::arby {
604599
if (remainder == 1) {
605600
power *= base;
606601
}
607-
power._trap_leading_zero();
608602
return power;
609603
}
610604
// XXX: unimplemented shift operators commented out until implemented
@@ -633,7 +627,6 @@ namespace com::saxbophone::arby {
633627
* @returns `false` when value is `0`, otherwise `true`
634628
*/
635629
explicit constexprvector operator bool() const {
636-
_trap_leading_zero();
637630
// zero is false --all other values are true
638631
return _digits.size() > 0; // zero is encoded as empty digits array
639632
}

0 commit comments

Comments
 (0)