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
1 changed files with 1 additions and 1 deletions

View File

@ -1967,7 +1967,7 @@ void ZCCCompiler::InitFunctions()
do
{
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.
type = NewPointer(type);