Replace RGBLINK non-null pointers with references

This commit is contained in:
Rangi42
2024-03-03 00:39:20 -05:00
committed by Sylvie
parent 538b253dfb
commit 930a5c3e44
13 changed files with 469 additions and 487 deletions

View File

@@ -12,11 +12,6 @@
*/
void obj_ReadFile(char const *fileName, unsigned int i);
/*
* Perform validation on the object files' contents
*/
void obj_DoSanityChecks();
/*
* Evaluate all assertions
*/

View File

@@ -12,14 +12,14 @@
* Registers a section for output.
* @param section The section to add
*/
void out_AddSection(Section const *section);
void out_AddSection(Section const &section);
/*
* Finds an assigned section overlapping another one.
* @param section The section that is being overlapped
* @return A section overlapping it
*/
Section const *out_OverlappingSection(Section const *section);
Section const *out_OverlappingSection(Section const &section);
/*
* Writes all output (bin, sym, map) files.

View File

@@ -10,6 +10,6 @@
struct FileStackNode;
struct Symbol;
void sdobj_ReadFile(FileStackNode const *fileName, FILE *file, std::vector<Symbol> &fileSymbols);
void sdobj_ReadFile(FileStackNode const &where, FILE *file, std::vector<Symbol> &fileSymbols);
#endif // RGBDS_LINK_SDAS_OBJ_H

View File

@@ -58,13 +58,13 @@ struct Section {
* This is to avoid exposing the data structure in which sections are stored.
* @param callback The function to call for each structure.
*/
void sect_ForEach(void (*callback)(Section *));
void sect_ForEach(void (*callback)(Section &));
/*
* Registers a section to be processed.
* @param section The section to register.
*/
void sect_AddSection(Section *section);
void sect_AddSection(Section &section);
/*
* Finds a section by its name.

View File

@@ -31,7 +31,7 @@ struct Symbol {
Section *section;
};
void sym_AddSymbol(Symbol *symbol);
void sym_AddSymbol(Symbol &symbol);
/*
* Finds a symbol in all the defined symbols.