summaryrefslogtreecommitdiff
path: root/modules/mono/glue/cs_files/GD.cs
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mono/glue/cs_files/GD.cs')
-rw-r--r--modules/mono/glue/cs_files/GD.cs14
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/mono/glue/cs_files/GD.cs b/modules/mono/glue/cs_files/GD.cs
index b335ef55e4..ec1534cb9a 100644
--- a/modules/mono/glue/cs_files/GD.cs
+++ b/modules/mono/glue/cs_files/GD.cs
@@ -1,5 +1,7 @@
using System;
+// TODO: Add comments describing what this class does. It is not obvious.
+
namespace Godot
{
public static partial class GD
@@ -89,7 +91,7 @@ namespace Godot
public static int[] Range(int length)
{
- int[] ret = new int[length];
+ var ret = new int[length];
for (int i = 0; i < length; i++)
{
@@ -104,7 +106,7 @@ namespace Godot
if (to < from)
return new int[0];
- int[] ret = new int[to - from];
+ var ret = new int[to - from];
for (int i = from; i < to; i++)
{
@@ -122,14 +124,14 @@ namespace Godot
return new int[0];
// Calculate count
- int count = 0;
+ int count;
if (increment > 0)
- count = ((to - from - 1) / increment) + 1;
+ count = (to - from - 1) / increment + 1;
else
- count = ((from - to - 1) / -increment) + 1;
+ count = (from - to - 1) / -increment + 1;
- int[] ret = new int[count];
+ var ret = new int[count];
if (increment > 0)
{