diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/ConstString.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/ConstString.cpp index e284a8e..5a5f979 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/ConstString.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/ConstString.cpp @@ -5,7 +5,7 @@ static void ConstructConstString(void* self) { new (self) ArbUt::StringView(); } static void ConstructConstStringFromStd(void* self, const std::string& s) { new (self) ArbUt::StringView(s.c_str(), s.length()); } -static void CopyConstructConstString(const ArbUt::StringView& other, void* self) { +static void CopyConstructConstString(void* self, const ArbUt::StringView& other) { new (self) ArbUt::StringView(other); } static void DestructConstString(void* self) { ((ArbUt::StringView*)self)->~StringView(); } @@ -19,18 +19,18 @@ void ConstStringRegister::Register(asIScriptEngine* engine) { Assert(r >= 0); r = engine->RegisterObjectBehaviour("constString", asBEHAVE_CONSTRUCT, "void f()", asFUNCTION(ConstructConstString), - asCALL_CDECL_OBJLAST); + asCALL_CDECL_OBJFIRST); Assert(r >= 0); r = engine->RegisterObjectBehaviour("constString", asBEHAVE_CONSTRUCT, "void f(const string &in s)", - asFUNCTION(ConstructConstStringFromStd), asCALL_CDECL_OBJLAST); + asFUNCTION(ConstructConstStringFromStd), asCALL_CDECL_OBJFIRST); Assert(r >= 0); r = engine->RegisterObjectBehaviour("constString", asBEHAVE_CONSTRUCT, "void f(const constString &in)", - asFUNCTION(CopyConstructConstString), asCALL_CDECL_OBJLAST); + asFUNCTION(CopyConstructConstString), asCALL_CDECL_OBJFIRST); Assert(r >= 0); r = engine->RegisterObjectBehaviour("constString", asBEHAVE_DESTRUCT, "void f()", asFUNCTION(DestructConstString), - asCALL_CDECL_OBJLAST); + asCALL_CDECL_OBJFIRST); Assert(r >= 0); r = engine->RegisterObjectMethod(