mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Use a patch_AddAssertion function instead of extern assertions
This commit is contained in:
@@ -3,6 +3,23 @@
|
||||
#ifndef RGBDS_LINK_PATCH_HPP
|
||||
#define RGBDS_LINK_PATCH_HPP
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "link/section.hpp"
|
||||
|
||||
struct Symbol;
|
||||
|
||||
struct Assertion {
|
||||
Patch patch; // Also used for its `.type`
|
||||
std::string message;
|
||||
// This would be redundant with `patch.pcSection->fileSymbols`, but `section` is sometimes
|
||||
// `nullptr`!
|
||||
std::vector<Symbol> *fileSymbols;
|
||||
};
|
||||
|
||||
Assertion &patch_AddAssertion();
|
||||
|
||||
// Checks all assertions
|
||||
void patch_CheckAssertions();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user