You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-14 13:41:12 +00:00
#18051: Use 'var' when applicable
(cherry picked from commit fdfc478c88)
This commit is contained in:
committed by
Hein-Pieter van Braam
parent
e7b97af276
commit
31171ea5a2
@@ -7,9 +7,9 @@ namespace Godot
|
||||
{
|
||||
private static Dictionary<object, object> ArraysToDictionary(object[] keys, object[] values)
|
||||
{
|
||||
Dictionary<object, object> ret = new Dictionary<object, object>();
|
||||
var ret = new Dictionary<object, object>();
|
||||
|
||||
for (int i = 0; i < keys.Length; i++)
|
||||
for (var i = 0; i < keys.Length; i++)
|
||||
{
|
||||
ret.Add(keys[i], values[i]);
|
||||
}
|
||||
@@ -19,11 +19,11 @@ namespace Godot
|
||||
|
||||
private static void DictionaryToArrays(Dictionary<object, object> from, out object[] keysTo, out object[] valuesTo)
|
||||
{
|
||||
Dictionary<object, object>.KeyCollection keys = from.Keys;
|
||||
var keys = from.Keys;
|
||||
keysTo = new object[keys.Count];
|
||||
keys.CopyTo(keysTo, 0);
|
||||
|
||||
Dictionary<object, object>.ValueCollection values = from.Values;
|
||||
var values = from.Values;
|
||||
valuesTo = new object[values.Count];
|
||||
values.CopyTo(valuesTo, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user