1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-29 16:16:38 +00:00

#18051: Do not use var in a for-loop, or where type is not obvious

(cherry picked from commit e59fad3924)
This commit is contained in:
Xavier Cho
2018-04-17 07:33:42 +09:00
committed by Hein-Pieter van Braam
parent 72bcacf2b6
commit d330bee1c2
7 changed files with 22 additions and 22 deletions

View File

@@ -221,9 +221,9 @@ namespace Godot
{
var orth = this;
for (var i = 0; i < 3; i++)
for (int i = 0; i < 3; i++)
{
for (var j = 0; j < 3; j++)
for (int j = 0; j < 3; j++)
{
real_t v = orth[i, j];
@@ -238,7 +238,7 @@ namespace Godot
}
}
for (var i = 0; i < 24; i++)
for (int i = 0; i < 24; i++)
{
if (orthoBases[i] == orth)
return i;
@@ -413,8 +413,8 @@ namespace Godot
(_x[2] - _z[0]) * inv_s
);
} else {
var s = Mathf.Sqrt(-_x[0] - _y[1] + _z[2] + 1.0f) * 2f;
var inv_s = 1f / s;
real_t s = Mathf.Sqrt(-_x[0] - _y[1] + _z[2] + 1.0f) * 2f;
real_t inv_s = 1f / s;
return new Quat(
(_x[2] + _z[0]) * inv_s,
(_y[2] + _z[1]) * inv_s,