Make CreateScript use std::string to help prevent issues.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
3bd5bb3fe6
commit
e346f5ffb4
|
@ -320,8 +320,8 @@ void AngelScriptResolver::RegisterScriptType(asITypeInfo* typeInfo, const ArbUt:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void AngelScriptResolver::CreateScript(const char* name, const char* script) {
|
void AngelScriptResolver::CreateScript(const std::string& name, const std::string& script) {
|
||||||
EnsureGreater(_builder.AddSectionFromMemory(name, script), 0);
|
EnsureGreater(_builder.AddSectionFromMemory(name.c_str(), script.c_str()), 0);
|
||||||
}
|
}
|
||||||
void AngelScriptResolver::WriteByteCodeToFile(const char* file, bool stripDebugInfo) {
|
void AngelScriptResolver::WriteByteCodeToFile(const char* file, bool stripDebugInfo) {
|
||||||
FILE* wFile = nullptr;
|
FILE* wFile = nullptr;
|
||||||
|
|
|
@ -58,7 +58,7 @@ public:
|
||||||
|
|
||||||
void Initialize(CreatureLib::Battling::BattleLibrary* library) override { Initialize(library, true); }
|
void Initialize(CreatureLib::Battling::BattleLibrary* library) override { Initialize(library, true); }
|
||||||
void Initialize(CreatureLib::Battling::BattleLibrary* library, bool includeStandard);
|
void Initialize(CreatureLib::Battling::BattleLibrary* library, bool includeStandard);
|
||||||
void CreateScript(const char* name, const char* script);
|
void CreateScript(const std::string& name, const std::string& script);
|
||||||
inline void SetSourceDirectory(std::string const& path) noexcept { _sourceDirectory = path; }
|
inline void SetSourceDirectory(std::string const& path) noexcept { _sourceDirectory = path; }
|
||||||
const asIScriptModule* GetMainModule() const noexcept { return _mainModule; }
|
const asIScriptModule* GetMainModule() const noexcept { return _mainModule; }
|
||||||
CScriptBuilder& GetBuilder() noexcept { return _builder; }
|
CScriptBuilder& GetBuilder() noexcept { return _builder; }
|
||||||
|
|
Loading…
Reference in New Issue