mirror of
https://github.com/gbdev/rgbds.git
synced 2026-06-10 10:42:35 +00:00
Rename BaseV to ValidBaseV
This commit is contained in:
+3
-3
@@ -39,10 +39,10 @@ bool startsIdentifier(int c);
|
||||
bool continuesIdentifier(int c);
|
||||
|
||||
template<uint32_t Base>
|
||||
inline constexpr bool BaseV = Base > 0 && Base <= 36;
|
||||
inline constexpr bool ValidBaseV = Base > 0 && Base <= 36;
|
||||
|
||||
template<uint32_t Base>
|
||||
requires BaseV<Base>
|
||||
requires ValidBaseV<Base>
|
||||
bool isDigit(int c) {
|
||||
if constexpr (Base <= 10) {
|
||||
return c >= '0' && c < static_cast<int>('0' + Base);
|
||||
@@ -53,7 +53,7 @@ bool isDigit(int c) {
|
||||
}
|
||||
|
||||
template<uint32_t Base>
|
||||
requires BaseV<Base>
|
||||
requires ValidBaseV<Base>
|
||||
uint8_t parseDigit(int c) {
|
||||
assume(isDigit<Base>(c));
|
||||
if constexpr (Base <= 10) {
|
||||
|
||||
Reference in New Issue
Block a user