mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-06 04:05:38 +00:00
Move 1-byte overflow check to out_AbsByte
This check is already performed in bulk by all functions calling it except `out_AbsByte`, adding extra overhead to those.
This commit is contained in:
1 parent
598c923506
commit
aa90a53f34
1 file changed
+1
-1
+1
-1
@@ -201,7 +201,6 @@ void out_NewSection(char const *pzName, uint32_t secttype, int32_t org,
|
||||
*/
|
||||
static void absByteBypassCheck(int32_t b)
|
||||
{
|
||||
checksectionoverflow(1);
|
||||
b &= 0xFF;
|
||||
pCurrentSection->tData[nPC] = b;
|
||||
pCurrentSection->nPC++;
|
||||
@@ -214,6 +213,7 @@ static void absByteBypassCheck(int32_t b)
|
||||
void out_AbsByte(int32_t b)
|
||||
{
|
||||
checkcodesection();
|
||||
checksectionoverflow(1);
|
||||
absByteBypassCheck(b);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user