Changes for EffectParameter type in AngelScript, fixes for ConstString memory leak in AngelScript.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
#include <CreatureLib/Battling/Models/Creature.hpp>
|
||||
#include <cassert>
|
||||
#include <regex>
|
||||
#include "../../../extern/angelscript_addons/scriptarray/scriptarray.h"
|
||||
#include "../../../extern/angelscript_addons/scripthandle/scripthandle.h"
|
||||
#include "../../../extern/angelscript_addons/scripthelper/scripthelper.h"
|
||||
#include "../../../extern/angelscript_addons/scriptstdstring/scriptstdstring.h"
|
||||
@@ -226,14 +225,12 @@ uint8_t* AngelScripResolver::WriteByteCodeToMemory(size_t& size, bool stripDebug
|
||||
}
|
||||
void AngelScripResolver::LoadByteCodeFromMemory(
|
||||
uint8_t* byte, size_t size, const Dictionary<ScriptCategory, Dictionary<ConstString, const char*>>& types) {
|
||||
std::cout << "Loading from RAM" << std::endl;
|
||||
auto stream = new MemoryByteCodeStream(byte, size);
|
||||
InitializeByteCode(stream, types);
|
||||
delete stream;
|
||||
}
|
||||
void AngelScripResolver::InitializeByteCode(asIBinaryStream* stream,
|
||||
const Dictionary<ScriptCategory, Dictionary<ConstString, const char*>>& types) {
|
||||
std::cout << "Loading byte code" << std::endl;
|
||||
int result = _mainModule->LoadByteCode(stream);
|
||||
Assert(result == asSUCCESS);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user