mirror of
https://github.com/gbdev/rgbds.git
synced 2026-09-02 20:08:39 +00:00
Make explicit the assumption that targetFileName is checked before ever calling printDep
This commit is contained in:
@@ -8,6 +8,8 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "helpers.hpp" // assume
|
||||||
|
|
||||||
enum MissingInclude {
|
enum MissingInclude {
|
||||||
INC_ERROR, // A missing included file is an error that halts assembly
|
INC_ERROR, // A missing included file is an error that halts assembly
|
||||||
GEN_EXIT, // A missing included file is assumed to be generated; exit normally
|
GEN_EXIT, // A missing included file is assumed to be generated; exit normally
|
||||||
@@ -36,6 +38,7 @@ struct Options {
|
|||||||
|
|
||||||
void printDep(std::string const &depName) {
|
void printDep(std::string const &depName) {
|
||||||
if (dependFile) {
|
if (dependFile) {
|
||||||
|
assume(targetFileName.has_value());
|
||||||
fprintf(dependFile, "%s: %s\n", targetFileName->c_str(), depName.c_str());
|
fprintf(dependFile, "%s: %s\n", targetFileName->c_str(), depName.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user