Refactor to avoid redundant obj_CheckAssertions function

This commit is contained in:
Rangi42
2024-03-27 16:19:01 -04:00
parent dcb4e40388
commit 506911d7d0
7 changed files with 38 additions and 54 deletions

View File

@@ -3,26 +3,11 @@
#ifndef RGBDS_LINK_PATCH_H
#define RGBDS_LINK_PATCH_H
#include <deque>
#include <stdint.h>
#include <vector>
#include "linkdefs.hpp"
#include "link/section.hpp"
struct Assertion {
Patch patch; // Also used for its `.type`
std::string message;
// This would be redundant with `.section->fileSymbols`, but `section` is sometimes `nullptr`!
std::vector<Symbol> *fileSymbols;
};
/*
* Checks all assertions
* @return true if assertion failed
*/
void patch_CheckAssertions(std::deque<Assertion> &assertions);
void patch_CheckAssertions();
/*
* Applies all SECTIONs' patches to them