mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Made sourceLine argument optional to avoid string allocation
This commit is contained in:
parent
50cfc7e5ad
commit
a307450e17
3 changed files with 8 additions and 7 deletions
|
@ -847,12 +847,11 @@ void ScriptCompiler::EmitOpcode(int opcode, unsigned int sourcePos)
|
|||
}
|
||||
|
||||
if (script->m_ProgToSource) {
|
||||
str sourceLine;
|
||||
sourceinfo_t info;
|
||||
|
||||
info.sourcePos = sourcePos;
|
||||
|
||||
script->GetSourceAt(sourcePos, sourceLine, info.column, info.line);
|
||||
script->GetSourceAt(sourcePos, NULL, info.column, info.line);
|
||||
script->m_ProgToSource->addKeyValue(code_pos) = info;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue