mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-10 22:00:54 +01:00
Fix unused variable warning
This commit is contained in:
parent
81488f1fe4
commit
d1739ba151
1 changed files with 4 additions and 2 deletions
|
@ -1064,7 +1064,6 @@ static int luauF_vector(lua_State* L, StkId res, TValue* arg0, int nresults, Stk
|
||||||
float x = (float)nvalue(arg0);
|
float x = (float)nvalue(arg0);
|
||||||
float y = (float)nvalue(args);
|
float y = (float)nvalue(args);
|
||||||
float z = 0.0f;
|
float z = 0.0f;
|
||||||
float w = 0.0f;
|
|
||||||
|
|
||||||
if (nparams >= 3)
|
if (nparams >= 3)
|
||||||
{
|
{
|
||||||
|
@ -1074,15 +1073,18 @@ static int luauF_vector(lua_State* L, StkId res, TValue* arg0, int nresults, Stk
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LUA_VECTOR_SIZE == 4
|
#if LUA_VECTOR_SIZE == 4
|
||||||
|
float w = 0.0f;
|
||||||
if (nparams >= 4)
|
if (nparams >= 4)
|
||||||
{
|
{
|
||||||
if (!ttisnumber(args + 2))
|
if (!ttisnumber(args + 2))
|
||||||
return -1;
|
return -1;
|
||||||
w = (float)nvalue(args + 2);
|
w = (float)nvalue(args + 2);
|
||||||
}
|
}
|
||||||
|
setvvalue(res, x, y, z, w);
|
||||||
|
#else
|
||||||
|
setvvalue(res, x, y, z, 0.0f);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
setvvalue(res, x, y, z, w);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue