mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Use automatically-allocated std::string_view for macros
This commit is contained in:
@@ -282,10 +282,8 @@ static void newMacroContext(Symbol const ¯o, std::shared_ptr<MacroArgs> macr
|
||||
.macroArgs = macroArgs,
|
||||
});
|
||||
|
||||
std::string_view *macroView = macro.getMacro();
|
||||
context.lexerState.setViewAsNextState(
|
||||
"MACRO", macroView->data(), macroView->size(), macro.fileLine
|
||||
);
|
||||
std::string_view view = macro.getMacro();
|
||||
context.lexerState.setViewAsNextState("MACRO", view.data(), view.size(), macro.fileLine);
|
||||
}
|
||||
|
||||
static Context &newReptContext(int32_t reptLineNo, char const *body, size_t size, uint32_t count) {
|
||||
|
||||
Reference in New Issue
Block a user