Avoid a few copies in mwscript

This commit is contained in:
Evil Eye 2024-06-29 10:31:49 +02:00
parent 72b62f845e
commit ad7fb3d13f
3 changed files with 15 additions and 16 deletions

View file

@ -80,16 +80,15 @@ namespace Compiler
/// \param explicitReference In: has explicit reference; Out: set to false, if
/// explicit reference is not available for this instruction.
void registerFunction(const std::string& keyword, ScriptReturn returnType, const ScriptArgs& argumentType,
int code, int codeExplicit = -1);
void registerFunction(const std::string& keyword, ScriptReturn returnType, ScriptArgs argumentType, int code,
int codeExplicit = -1);
///< Register a custom function
/// - keyword must be all lower case.
/// - keyword must be unique
/// - if explicit references are not supported, segment5codeExplicit must be set to -1
/// \note Currently only segment 3 and segment 5 opcodes are supported.
void registerInstruction(
const std::string& keyword, const ScriptArgs& argumentType, int code, int codeExplicit = -1);
void registerInstruction(const std::string& keyword, ScriptArgs argumentType, int code, int codeExplicit = -1);
///< Register a custom instruction
/// - keyword must be all lower case.
/// - keyword must be unique