mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Replace RGBFIX non-null pointers with references
This commit is contained in:
@@ -188,10 +188,10 @@ static uint8_t tpp1Rev[2];
|
|||||||
/*
|
/*
|
||||||
* @return False on failure
|
* @return False on failure
|
||||||
*/
|
*/
|
||||||
static bool readMBCSlice(char const **name, char const *expected)
|
static bool readMBCSlice(char const *&name, char const *expected)
|
||||||
{
|
{
|
||||||
while (*expected) {
|
while (*expected) {
|
||||||
char c = *(*name)++;
|
char c = *name++;
|
||||||
|
|
||||||
if (c == '\0') // Name too short
|
if (c == '\0') // Name too short
|
||||||
return false;
|
return false;
|
||||||
@@ -243,7 +243,7 @@ static enum MbcType parseMBC(char const *name)
|
|||||||
|
|
||||||
#define tryReadSlice(expected) \
|
#define tryReadSlice(expected) \
|
||||||
do { \
|
do { \
|
||||||
if (!readMBCSlice(&ptr, expected)) \
|
if (!readMBCSlice(ptr, expected)) \
|
||||||
return MBC_BAD; \
|
return MBC_BAD; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user