Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
FourteenBrush committed Apr 10, 2024
1 parent d2cb807 commit 4085c6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ public double solve() {
}
default -> {
while (numCalculations > 1) {
// FIXME: decrement numCalculations?
shorten();
}
yield head.solve();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ static void notNull(Object o, String message) {
}
}

static void isFalse(boolean condition, String message, Object... placeholders) {
static void isFalse(boolean condition, String fmt, Object... placeholders) {
if (condition) {
throw new SyntaxException(message, placeholders);
throw new SyntaxException(fmt, placeholders);
}
}

static void isTrue(boolean condition, String message, Object... placeholders) {
static void isTrue(boolean condition, String fmt, Object... placeholders) {
if (!condition) {
throw new SyntaxException(message.formatted(placeholders));
throw new SyntaxException(fmt.formatted(placeholders));
}
}

static void indexWithinBounds(int idx, int size, String message, Object... placeholders) {
static void indexWithinBounds(int idx, int size, String fmt, Object... placeholders) {
if (idx < 0 || idx >= size) {
throw new IndexOutOfBoundsException(message.formatted(placeholders));
throw new IndexOutOfBoundsException(fmt.formatted(placeholders));
}
}

Expand Down

0 comments on commit 4085c6a

Please sign in to comment.