Skip to content

Commit

Permalink
karm-text: Scan::nextUint() return usize instead of u64.
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepy-monax committed Aug 6, 2023
1 parent 77f66f3 commit 4cde363
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libs/karm-text/scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ struct _Scan {
return d;
}

Opt<u64> nextUint(usize base = 10) {
Opt<usize> nextUint(usize base = 10) {
bool isNum = false;
u64 result = 0;
usize result = 0;

while (not ended()) {
auto maybeDigit = nextDigit(base);
Expand All @@ -184,10 +184,10 @@ struct _Scan {
return result;
}

Opt<i64> nextInt(usize base = 10) {
Opt<isize> nextInt(usize base = 10) {
bool isNeg = false;
bool isNum = false;
i64 result = 0;
isize result = 0;

if (peek(0) == '-' and _parseDigit(peek(1), base)) {
isNeg = true;
Expand Down

0 comments on commit 4cde363

Please sign in to comment.