#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)
{
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;

View file

@ -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)
{

View file

@ -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;

View file

@ -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)
{

View file

@ -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)
{