mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Use std::unique_ptr for rgblink sections (#1337)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
// GUIDELINE: external code MUST NOT BE AWARE of the data structure used!
|
||||
|
||||
#include <memory>
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -50,7 +51,7 @@ struct Section {
|
||||
// Extra info computed during linking
|
||||
std::vector<Symbol> *fileSymbols;
|
||||
std::vector<Symbol *> symbols;
|
||||
Section *nextu; // The next "component" of this unionized sect
|
||||
std::unique_ptr<Section> nextu; // The next "component" of this unionized sect
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -64,7 +65,7 @@ void sect_ForEach(void (*callback)(Section &));
|
||||
* Registers a section to be processed.
|
||||
* @param section The section to register.
|
||||
*/
|
||||
void sect_AddSection(Section §ion);
|
||||
void sect_AddSection(std::unique_ptr<Section> &§ion);
|
||||
|
||||
/*
|
||||
* Finds a section by its name.
|
||||
|
||||
Reference in New Issue
Block a user