mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Replace assert with assume for release build optimization (#1390)
This commit is contained in:
@@ -3,10 +3,11 @@
|
||||
#ifndef RGBDS_LINKDEFS_H
|
||||
#define RGBDS_LINKDEFS_H
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
|
||||
#include "helpers.hpp" // assume
|
||||
|
||||
#define RGBDS_OBJECT_VERSION_STRING "RGBA"
|
||||
#define RGBDS_OBJECT_REV 10U
|
||||
|
||||
@@ -93,7 +94,7 @@ extern struct SectionTypeInfo {
|
||||
* @return `true` if the section's definition includes data
|
||||
*/
|
||||
static inline bool sect_HasData(SectionType type) {
|
||||
assert(type != SECTTYPE_INVALID);
|
||||
assume(type != SECTTYPE_INVALID);
|
||||
return type == SECTTYPE_ROM0 || type == SECTTYPE_ROMX;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user