Don't use a struct reference for vectors as return type just like for parameters

This commit is contained in:
Leonard2 2016-10-30 04:35:48 +01:00
parent 94410accf4
commit 8be7af41a9

View file

@ -1967,7 +1967,7 @@ void ZCCCompiler::InitFunctions()
do do
{ {
auto type = DetermineType(c->Type(), f, f->Name, t, false, false); auto type = DetermineType(c->Type(), f, f->Name, t, false, false);
if (type->IsKindOf(RUNTIME_CLASS(PStruct))) if (type->IsKindOf(RUNTIME_CLASS(PStruct)) && type != TypeVector2 && type != TypeVector3)
{ {
// structs and classes only get passed by pointer. // structs and classes only get passed by pointer.
type = NewPointer(type); type = NewPointer(type);