diff options
author | Xavier Cho <mysticfallband@gmail.com> | 2018-04-08 12:38:02 +0900 |
---|---|---|
committer | Xavier Cho <mysticfallband@gmail.com> | 2018-04-17 07:39:37 +0900 |
commit | 93dd59d763146938d59defe270f43091b5579a0a (patch) | |
tree | c2d688f237e932122d4ba68db5328134b914620a | |
parent | fdfc478c888db89c44c748f273ef7fe4466d5c89 (diff) |
#18051: Remove unnecessary variable assignments
-rw-r--r-- | modules/mono/glue/cs_files/AABB.cs | 4 | ||||
-rw-r--r-- | modules/mono/glue/cs_files/Color.cs | 6 | ||||
-rw-r--r-- | modules/mono/glue/cs_files/GD.cs | 2 | ||||
-rw-r--r-- | modules/mono/glue/cs_files/StringExtensions.cs | 4 | ||||
-rw-r--r-- | modules/mono/glue/cs_files/Transform2D.cs | 2 |
5 files changed, 7 insertions, 11 deletions
diff --git a/modules/mono/glue/cs_files/AABB.cs b/modules/mono/glue/cs_files/AABB.cs index 84566d855a..909f999333 100644 --- a/modules/mono/glue/cs_files/AABB.cs +++ b/modules/mono/glue/cs_files/AABB.cs @@ -123,7 +123,6 @@ namespace Godot if (size.z > max_size) { axis = new Vector3(0f, 0f, 1f); - max_size = size.z; } return axis; @@ -143,7 +142,6 @@ namespace Godot if (size.z > max_size) { axis = Vector3.Axis.Z; - max_size = size.z; } return axis; @@ -176,7 +174,6 @@ namespace Godot if (size.z < max_size) { axis = new Vector3(0f, 0f, 1f); - max_size = size.z; } return axis; @@ -196,7 +193,6 @@ namespace Godot if (size.z < max_size) { axis = Vector3.Axis.Z; - max_size = size.z; } return axis; diff --git a/modules/mono/glue/cs_files/Color.cs b/modules/mono/glue/cs_files/Color.cs index d15f891e21..8e9091cc09 100644 --- a/modules/mono/glue/cs_files/Color.cs +++ b/modules/mono/glue/cs_files/Color.cs @@ -342,7 +342,7 @@ namespace Godot for (var i = 0; i < 2; i++) { int c = str[i + ofs]; - var v = 0; + int v; if (c >= '0' && c <= '9') { @@ -403,7 +403,7 @@ namespace Godot if (color[0] == '#') color = color.Substring(1, color.Length - 1); - var alpha = false; + bool alpha; if (color.Length == 8) alpha = true; @@ -449,7 +449,7 @@ namespace Godot if (rgba[0] == '#') rgba = rgba.Substring(1); - var alpha = false; + bool alpha; if (rgba.Length == 8) { diff --git a/modules/mono/glue/cs_files/GD.cs b/modules/mono/glue/cs_files/GD.cs index f0967f2269..f565d092dd 100644 --- a/modules/mono/glue/cs_files/GD.cs +++ b/modules/mono/glue/cs_files/GD.cs @@ -124,7 +124,7 @@ namespace Godot return new int[0]; // Calculate count - var count = 0; + int count; if (increment > 0) count = ((to - from - 1) / increment) + 1; diff --git a/modules/mono/glue/cs_files/StringExtensions.cs b/modules/mono/glue/cs_files/StringExtensions.cs index 030d1282f3..de85b080df 100644 --- a/modules/mono/glue/cs_files/StringExtensions.cs +++ b/modules/mono/glue/cs_files/StringExtensions.cs @@ -259,7 +259,7 @@ namespace Godot { int basepos = instance.Find("://"); - var rs = string.Empty; + string rs; var @base = string.Empty; if (basepos != -1) @@ -378,7 +378,7 @@ namespace Godot while (instance[src] != 0 && text[tgt] != 0) { - var match = false; + bool match; if (case_insensitive) { diff --git a/modules/mono/glue/cs_files/Transform2D.cs b/modules/mono/glue/cs_files/Transform2D.cs index cfb6a68b38..d3969dfc6e 100644 --- a/modules/mono/glue/cs_files/Transform2D.cs +++ b/modules/mono/glue/cs_files/Transform2D.cs @@ -165,7 +165,7 @@ namespace Godot // Clamp dot to [-1, 1] dot = (dot < -1.0f) ? -1.0f : ((dot > 1.0f) ? 1.0f : dot); - var v = new Vector2(); + Vector2 v; if (dot > 0.9995f) { |