mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-07 12:45:34 +00:00
Rename BaseV to ValidBaseV
This commit is contained in:
1 parent
6b2b6e6000
commit
0b91bf654b
3 files changed
+6
-6
No files matched your search
+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