Skip to content

Commit 90ca3c6

Browse files
committed
Code optimizations (closed #33)
1 parent 96bdedd commit 90ca3c6

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

Code/AccountInBank/Helper.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ internal static class Helper
2525
{
2626
public static ATM[] GetAllATMs()
2727
{
28-
var list = new List<ATM>
28+
return new[]
2929
{
3030
new ATM( new Vector3( -1109.797f, -1690.808f, 4.375014f ), 122.9616f, false ),
3131
new ATM( new Vector3( -821.6062f, -1081.885f, 11.13243f ), 29.3056f, false ),
@@ -75,8 +75,6 @@ public static ATM[] GetAllATMs()
7575
new ATM( new Vector3( -1409.782f, -100.410f, 52.387f ), 109.271f, false ),
7676
new ATM( new Vector3( -1410.279f, -98.649f, 52.436f ), 112.710f, false ),
7777
};
78-
79-
return list.ToArray();
8078
}
8179

8280
/// <summary>
@@ -134,7 +132,7 @@ public static int GetPlayerIndex()
134132

135133
public static Keys StringToKey( string key, Keys defaultValue )
136134
{
137-
if ( string.IsNullOrEmpty( key ) || key.Length == 0 )
135+
if ( string.IsNullOrEmpty( key ) )
138136
{
139137
return defaultValue;
140138
}

0 commit comments

Comments
 (0)