Pass std::string references to symbol functions

This commit is contained in:
Rangi42
2024-03-18 13:29:09 -04:00
committed by Sylvie
parent 6cabb8c9af
commit 472d1bde06
9 changed files with 174 additions and 153 deletions

View File

@@ -10,6 +10,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string_view>
#include "opmath.hpp"
@@ -50,7 +51,7 @@ void rpn_Number(Expression &expr, uint32_t val) {
expr.val = val;
}
void rpn_Symbol(Expression &expr, char const *symName) {
void rpn_Symbol(Expression &expr, std::string const &symName) {
initExpression(expr);
Symbol *sym = sym_FindScopedSymbol(symName);
@@ -92,7 +93,7 @@ static void bankSelf(Expression &expr) {
}
}
void rpn_BankSymbol(Expression &expr, char const *symName) {
void rpn_BankSymbol(Expression &expr, std::string const &symName) {
Symbol const *sym = sym_FindScopedSymbol(symName);
// The @ symbol is treated differently.