mirror of
https://github.com/gbdev/rgbds.git
synced 2026-09-24 06:37:07 +00:00
Avoid allocating for our linkdef names (#2111)
This reverts a change introduced in fd78a9ae8, though it wasn't that commit's main point
so I'm feeling okay with undoing that.
This feels like an overkill change, using a static string is good enough for this
since we never modify this. I have considered using `string_view` instead, to have
the best of both worlds, but that's not NUL-terminated so our print functions
get a little grumpy.
This commit is contained in:
+3
-5
@@ -309,7 +309,7 @@ static void mergeSections(
|
||||
sectError(
|
||||
"Section \"%s\" already exists but with type `%s`",
|
||||
sect.name.c_str(),
|
||||
sect.typeInfo().name.c_str()
|
||||
sect.typeInfo().name
|
||||
);
|
||||
}
|
||||
|
||||
@@ -433,7 +433,7 @@ static Section *getSection(
|
||||
} else if (bank < typeInfo.firstBank || bank > typeInfo.lastBank) {
|
||||
error(
|
||||
"%s bank value $%04" PRIx32 " out of range ($%04" PRIx32 " to $%04" PRIx32 ")",
|
||||
typeInfo.name.c_str(),
|
||||
typeInfo.name,
|
||||
bank,
|
||||
typeInfo.firstBank,
|
||||
typeInfo.lastBank
|
||||
@@ -478,9 +478,7 @@ static Section *getSection(
|
||||
alignment = 0; // Ignore it if it's satisfied
|
||||
} else if (typeInfo.startAddr & alignMask) {
|
||||
error(
|
||||
"Section \"%s\"'s alignment cannot be attained in %s",
|
||||
name.c_str(),
|
||||
typeInfo.name.c_str()
|
||||
"Section \"%s\"'s alignment cannot be attained in %s", name.c_str(), typeInfo.name
|
||||
);
|
||||
alignment = 0; // Ignore it if it's unattainable
|
||||
org = 0;
|
||||
|
||||
Reference in New Issue
Block a user