mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Remove now-unnecessary cleanup functions
This commit is contained in:
@@ -72,11 +72,6 @@ void sect_AddSection(struct Section *section);
|
|||||||
*/
|
*/
|
||||||
struct Section *sect_GetSection(std::string const &name);
|
struct Section *sect_GetSection(std::string const &name);
|
||||||
|
|
||||||
/*
|
|
||||||
* `free`s all section memory that was allocated.
|
|
||||||
*/
|
|
||||||
void sect_CleanupSections(void);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Checks if all sections meet reasonable criteria, such as max size
|
* Checks if all sections meet reasonable criteria, such as max size
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -39,9 +39,4 @@ void sym_AddSymbol(struct Symbol *symbol);
|
|||||||
*/
|
*/
|
||||||
struct Symbol *sym_GetSymbol(std::string const &name);
|
struct Symbol *sym_GetSymbol(std::string const &name);
|
||||||
|
|
||||||
/*
|
|
||||||
* `free`s all symbol memory that was allocated.
|
|
||||||
*/
|
|
||||||
void sym_CleanupSymbols(void);
|
|
||||||
|
|
||||||
#endif // RGBDS_LINK_SYMBOL_H
|
#endif // RGBDS_LINK_SYMBOL_H
|
||||||
|
|||||||
@@ -550,8 +550,5 @@ static void freeSection(struct Section *section)
|
|||||||
|
|
||||||
void obj_Cleanup(void)
|
void obj_Cleanup(void)
|
||||||
{
|
{
|
||||||
sym_CleanupSymbols();
|
|
||||||
|
|
||||||
sect_ForEach(freeSection);
|
sect_ForEach(freeSection);
|
||||||
sect_CleanupSections();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,11 +185,6 @@ struct Section *sect_GetSection(std::string const &name)
|
|||||||
return search != sections.end() ? search->second : NULL;
|
return search != sections.end() ? search->second : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sect_CleanupSections(void)
|
|
||||||
{
|
|
||||||
sections.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void doSanityChecks(struct Section *section)
|
static void doSanityChecks(struct Section *section)
|
||||||
{
|
{
|
||||||
// Sanity check the section's type
|
// Sanity check the section's type
|
||||||
|
|||||||
@@ -17,11 +17,9 @@ void sym_AddSymbol(struct Symbol *symbol)
|
|||||||
{
|
{
|
||||||
// Check if the symbol already exists
|
// Check if the symbol already exists
|
||||||
if (struct Symbol *other = sym_GetSymbol(symbol->name); other) {
|
if (struct Symbol *other = sym_GetSymbol(symbol->name); other) {
|
||||||
fprintf(stderr, "error: \"%s\" both in %s from ", symbol->name.c_str(),
|
fprintf(stderr, "error: \"%s\" both in %s from ", symbol->name.c_str(), symbol->objFileName);
|
||||||
symbol->objFileName);
|
|
||||||
dumpFileStack(symbol->src);
|
dumpFileStack(symbol->src);
|
||||||
fprintf(stderr, "(%" PRIu32 ") and in %s from ",
|
fprintf(stderr, "(%" PRIu32 ") and in %s from ", symbol->lineNo, other->objFileName);
|
||||||
symbol->lineNo, other->objFileName);
|
|
||||||
dumpFileStack(other->src);
|
dumpFileStack(other->src);
|
||||||
fprintf(stderr, "(%" PRIu32 ")\n", other->lineNo);
|
fprintf(stderr, "(%" PRIu32 ")\n", other->lineNo);
|
||||||
exit(1);
|
exit(1);
|
||||||
@@ -36,8 +34,3 @@ struct Symbol *sym_GetSymbol(std::string const &name)
|
|||||||
auto search = symbols.find(name);
|
auto search = symbols.find(name);
|
||||||
return search != symbols.end() ? search->second : NULL;
|
return search != symbols.end() ? search->second : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sym_CleanupSymbols(void)
|
|
||||||
{
|
|
||||||
symbols.clear();
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user