mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Remove 'inline' from functions not in headers
This commit is contained in:
@@ -53,12 +53,12 @@ struct CharmapStackEntry {
|
||||
|
||||
struct CharmapStackEntry *charmapStack;
|
||||
|
||||
static inline struct Charmap *charmap_Get(const char *name)
|
||||
static struct Charmap *charmap_Get(const char *name)
|
||||
{
|
||||
return hash_GetElement(charmaps, name);
|
||||
}
|
||||
|
||||
static inline struct Charmap *resizeCharmap(struct Charmap *map, size_t capacity)
|
||||
static struct Charmap *resizeCharmap(struct Charmap *map, size_t capacity)
|
||||
{
|
||||
struct Charmap *new = realloc(map, sizeof(*map) + sizeof(*map->nodes) * capacity);
|
||||
|
||||
@@ -69,7 +69,7 @@ static inline struct Charmap *resizeCharmap(struct Charmap *map, size_t capacity
|
||||
return new;
|
||||
}
|
||||
|
||||
static inline void initNode(struct Charnode *node)
|
||||
static void initNode(struct Charnode *node)
|
||||
{
|
||||
node->isTerminal = false;
|
||||
memset(node->next, 0, sizeof(node->next));
|
||||
|
||||
@@ -594,7 +594,7 @@ struct KeywordDictNode {
|
||||
} keywordDict[351] = {0}; /* Make sure to keep this correct when adding keywords! */
|
||||
|
||||
/* Convert a char into its index into the dict */
|
||||
static inline uint8_t dictIndex(char c)
|
||||
static uint8_t dictIndex(char c)
|
||||
{
|
||||
/* Translate uppercase to lowercase (roughly) */
|
||||
if (c > 0x60)
|
||||
|
||||
@@ -335,7 +335,7 @@ static void freeDsArgList(struct DsArgList *args)
|
||||
free(args->args);
|
||||
}
|
||||
|
||||
static inline void failAssert(enum AssertionType type)
|
||||
static void failAssert(enum AssertionType type)
|
||||
{
|
||||
switch (type) {
|
||||
case ASSERT_FATAL:
|
||||
@@ -349,7 +349,7 @@ static inline void failAssert(enum AssertionType type)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void failAssertMsg(enum AssertionType type, char const *msg)
|
||||
static void failAssertMsg(enum AssertionType type, char const *msg)
|
||||
{
|
||||
switch (type) {
|
||||
case ASSERT_FATAL:
|
||||
|
||||
@@ -41,7 +41,7 @@ struct UnionStackEntry {
|
||||
/*
|
||||
* A quick check to see if we have an initialized section
|
||||
*/
|
||||
static inline void checksection(void)
|
||||
static void checksection(void)
|
||||
{
|
||||
if (pCurrentSection == NULL)
|
||||
fatalerror("Code generation before SECTION directive\n");
|
||||
@@ -51,7 +51,7 @@ static inline void checksection(void)
|
||||
* A quick check to see if we have an initialized section that can contain
|
||||
* this much initialized data
|
||||
*/
|
||||
static inline void checkcodesection(void)
|
||||
static void checkcodesection(void)
|
||||
{
|
||||
checksection();
|
||||
|
||||
@@ -60,7 +60,7 @@ static inline void checkcodesection(void)
|
||||
pCurrentSection->name);
|
||||
}
|
||||
|
||||
static inline void checkSectionSize(struct Section const *sect, uint32_t size)
|
||||
static void checkSectionSize(struct Section const *sect, uint32_t size)
|
||||
{
|
||||
uint32_t maxSize = maxsize[sect->type];
|
||||
|
||||
@@ -72,7 +72,7 @@ static inline void checkSectionSize(struct Section const *sect, uint32_t size)
|
||||
/*
|
||||
* Check if the section has grown too much.
|
||||
*/
|
||||
static inline void reserveSpace(uint32_t delta_size)
|
||||
static void reserveSpace(uint32_t delta_size)
|
||||
{
|
||||
/*
|
||||
* This check is here to trap broken code that generates sections that
|
||||
@@ -474,7 +474,7 @@ void sect_AlignPC(uint8_t alignment, uint16_t offset)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void growSection(uint32_t growth)
|
||||
static void growSection(uint32_t growth)
|
||||
{
|
||||
curOffset += growth;
|
||||
if (curOffset + loadOffset > pCurrentSection->size)
|
||||
@@ -483,19 +483,19 @@ static inline void growSection(uint32_t growth)
|
||||
currentLoadSection->size = curOffset;
|
||||
}
|
||||
|
||||
static inline void writebyte(uint8_t byte)
|
||||
static void writebyte(uint8_t byte)
|
||||
{
|
||||
pCurrentSection->data[sect_GetOutputOffset()] = byte;
|
||||
growSection(1);
|
||||
}
|
||||
|
||||
static inline void writeword(uint16_t b)
|
||||
static void writeword(uint16_t b)
|
||||
{
|
||||
writebyte(b & 0xFF);
|
||||
writebyte(b >> 8);
|
||||
}
|
||||
|
||||
static inline void writelong(uint32_t b)
|
||||
static void writelong(uint32_t b)
|
||||
{
|
||||
writebyte(b & 0xFF);
|
||||
writebyte(b >> 8);
|
||||
@@ -503,8 +503,7 @@ static inline void writelong(uint32_t b)
|
||||
writebyte(b >> 24);
|
||||
}
|
||||
|
||||
static inline void createPatch(enum PatchType type, struct Expression const *expr,
|
||||
uint32_t pcShift)
|
||||
static void createPatch(enum PatchType type, struct Expression const *expr, uint32_t pcShift)
|
||||
{
|
||||
out_CreatePatch(type, expr, sect_GetOutputOffset(), pcShift);
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ struct Symbol const *sym_GetPC(void)
|
||||
return PCSymbol;
|
||||
}
|
||||
|
||||
static inline bool isReferenced(struct Symbol const *sym)
|
||||
static bool isReferenced(struct Symbol const *sym)
|
||||
{
|
||||
return sym->ID != (uint32_t)-1;
|
||||
}
|
||||
@@ -680,7 +680,7 @@ void sym_SetExportAll(bool set)
|
||||
exportall = set;
|
||||
}
|
||||
|
||||
static inline struct Symbol *createBuiltinSymbol(char const *name)
|
||||
static struct Symbol *createBuiltinSymbol(char const *name)
|
||||
{
|
||||
struct Symbol *sym = createsymbol(name);
|
||||
|
||||
|
||||
@@ -106,8 +106,7 @@ static void processLinkerScript(void)
|
||||
* @param section The section to assign
|
||||
* @param location The location to assign the section to
|
||||
*/
|
||||
static inline void assignSection(struct Section *section,
|
||||
struct MemoryLocation const *location)
|
||||
static void assignSection(struct Section *section, struct MemoryLocation const *location)
|
||||
{
|
||||
section->org = location->address;
|
||||
section->bank = location->bank;
|
||||
|
||||
@@ -452,7 +452,7 @@ static void readAssertion(FILE *file, struct Assertion *assert,
|
||||
fileName);
|
||||
}
|
||||
|
||||
static inline struct Section *getMainSection(struct Section *section)
|
||||
static struct Section *getMainSection(struct Section *section)
|
||||
{
|
||||
if (section->modifier != SECTION_NORMAL)
|
||||
section = sect_GetSection(section->name);
|
||||
|
||||
@@ -37,7 +37,7 @@ struct RPNStack {
|
||||
size_t capacity;
|
||||
} stack;
|
||||
|
||||
static inline void initRPNStack(void)
|
||||
static void initRPNStack(void)
|
||||
{
|
||||
stack.capacity = 64;
|
||||
stack.values = malloc(sizeof(*stack.values) * stack.capacity);
|
||||
@@ -46,7 +46,7 @@ static inline void initRPNStack(void)
|
||||
err(1, "Failed to init RPN stack");
|
||||
}
|
||||
|
||||
static inline void clearRPNStack(void)
|
||||
static void clearRPNStack(void)
|
||||
{
|
||||
stack.size = 0;
|
||||
}
|
||||
@@ -92,7 +92,7 @@ static int32_t popRPN(struct FileStackNode const *node, uint32_t lineNo)
|
||||
return stack.values[stack.size];
|
||||
}
|
||||
|
||||
static inline void freeRPNStack(void)
|
||||
static void freeRPNStack(void)
|
||||
{
|
||||
free(stack.values);
|
||||
free(stack.errorFlags);
|
||||
|
||||
@@ -78,12 +78,12 @@ static bool popFile(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline bool isWhiteSpace(int c)
|
||||
static bool isWhiteSpace(int c)
|
||||
{
|
||||
return c == ' ' || c == '\t';
|
||||
}
|
||||
|
||||
static inline bool isNewline(int c)
|
||||
static bool isNewline(int c)
|
||||
{
|
||||
return c == '\r' || c == '\n';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user