mirror of
https://github.com/gbdev/rgbds.git
synced 2026-09-22 13:47:05 +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:
@@ -4,7 +4,6 @@
|
||||
#define RGBDS_LINKDEFS_HPP
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
|
||||
#include "helpers.hpp" // assume
|
||||
|
||||
@@ -99,7 +98,7 @@ static constexpr uint8_t FSTACKNODE_QUIET_BIT = 7;
|
||||
|
||||
// Non-`const` members may be patched in RGBLINK depending on CLI flags
|
||||
struct SectionTypeInfo {
|
||||
std::string const name;
|
||||
char const *name;
|
||||
uint16_t const startAddr;
|
||||
uint16_t size;
|
||||
uint32_t const firstBank;
|
||||
|
||||
Reference in New Issue
Block a user