Skip to content

Commit

Permalink
disabled binary and hexadecimal
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgerrets committed Nov 24, 2023
1 parent 9e47561 commit 0bd96ac
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions src/common/operator/cast_operators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1953,28 +1953,12 @@ struct HugeIntegerCastOperation {

template <class T, bool NEGATIVE>
static bool HandleHexDigit(T &state, uint8_t digit) {
if (state.intermediate > (NumericLimits<int64_t>::Maximum() - digit) / 16) {
// intermediate is full: need to flush it
if (!state.Flush()) {
return false;
}
}
state.intermediate = state.intermediate * 16 + digit;
state.digits++;
return true;
return false;
}

template <class T, bool NEGATIVE>
static bool HandleBinaryDigit(T &state, uint8_t digit) {
if (state.intermediate > (NumericLimits<int64_t>::Maximum() - digit) / 2) {
// intermediate is full: need to flush it
if (!state.Flush()) {
return false;
}
}
state.intermediate = state.intermediate * 2 + digit;
state.digits++;
return true;
return false;
}

template <class T, bool NEGATIVE>
Expand Down

0 comments on commit 0bd96ac

Please sign in to comment.