#18051: Remove unnecessary variable assignments

This commit is contained in:
Xavier Cho 2018-04-08 12:38:02 +09:00
parent fdfc478c88
commit 93dd59d763
5 changed files with 7 additions and 11 deletions

View File

@ -123,7 +123,6 @@ namespace Godot
if (size.z > max_size) if (size.z > max_size)
{ {
axis = new Vector3(0f, 0f, 1f); axis = new Vector3(0f, 0f, 1f);
max_size = size.z;
} }
return axis; return axis;
@ -143,7 +142,6 @@ namespace Godot
if (size.z > max_size) if (size.z > max_size)
{ {
axis = Vector3.Axis.Z; axis = Vector3.Axis.Z;
max_size = size.z;
} }
return axis; return axis;
@ -176,7 +174,6 @@ namespace Godot
if (size.z < max_size) if (size.z < max_size)
{ {
axis = new Vector3(0f, 0f, 1f); axis = new Vector3(0f, 0f, 1f);
max_size = size.z;
} }
return axis; return axis;
@ -196,7 +193,6 @@ namespace Godot
if (size.z < max_size) if (size.z < max_size)
{ {
axis = Vector3.Axis.Z; axis = Vector3.Axis.Z;
max_size = size.z;
} }
return axis; return axis;

View File

@ -342,7 +342,7 @@ namespace Godot
for (var i = 0; i < 2; i++) for (var i = 0; i < 2; i++)
{ {
int c = str[i + ofs]; int c = str[i + ofs];
var v = 0; int v;
if (c >= '0' && c <= '9') if (c >= '0' && c <= '9')
{ {
@ -403,7 +403,7 @@ namespace Godot
if (color[0] == '#') if (color[0] == '#')
color = color.Substring(1, color.Length - 1); color = color.Substring(1, color.Length - 1);
var alpha = false; bool alpha;
if (color.Length == 8) if (color.Length == 8)
alpha = true; alpha = true;
@ -449,7 +449,7 @@ namespace Godot
if (rgba[0] == '#') if (rgba[0] == '#')
rgba = rgba.Substring(1); rgba = rgba.Substring(1);
var alpha = false; bool alpha;
if (rgba.Length == 8) if (rgba.Length == 8)
{ {

View File

@ -124,7 +124,7 @@ namespace Godot
return new int[0]; return new int[0];
// Calculate count // Calculate count
var count = 0; int count;
if (increment > 0) if (increment > 0)
count = ((to - from - 1) / increment) + 1; count = ((to - from - 1) / increment) + 1;

View File

@ -259,7 +259,7 @@ namespace Godot
{ {
int basepos = instance.Find("://"); int basepos = instance.Find("://");
var rs = string.Empty; string rs;
var @base = string.Empty; var @base = string.Empty;
if (basepos != -1) if (basepos != -1)
@ -378,7 +378,7 @@ namespace Godot
while (instance[src] != 0 && text[tgt] != 0) while (instance[src] != 0 && text[tgt] != 0)
{ {
var match = false; bool match;
if (case_insensitive) if (case_insensitive)
{ {

View File

@ -165,7 +165,7 @@ namespace Godot
// Clamp dot to [-1, 1] // Clamp dot to [-1, 1]
dot = (dot < -1.0f) ? -1.0f : ((dot > 1.0f) ? 1.0f : dot); dot = (dot < -1.0f) ? -1.0f : ((dot > 1.0f) ? 1.0f : dot);
var v = new Vector2(); Vector2 v;
if (dot > 0.9995f) if (dot > 0.9995f)
{ {