mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Replace mwscript program serialization into a vector with simple struct
Mostly to avoid string literal lookup by index with iteration over all preciding literals and calling strlen. This is very inefficient. In genral this makes code much more straightforward but also makes it portable since now int and float of different sizes are properly supported.
This commit is contained in:
parent
60eede6a1d
commit
b88f0d2dbd
21 changed files with 93 additions and 162 deletions
|
@ -15,9 +15,9 @@ namespace Compiler
|
|||
{
|
||||
}
|
||||
|
||||
void ScriptParser::getCode(std::vector<Interpreter::Type_Code>& code) const
|
||||
Interpreter::Program ScriptParser::getProgram() const
|
||||
{
|
||||
mOutput.getCode(code);
|
||||
return mOutput.getProgram();
|
||||
}
|
||||
|
||||
bool ScriptParser::parseName(const std::string& name, const TokenLoc& loc, Scanner& scanner)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue