Fix table to godot converter

This commit is contained in:
Ruslan Mustakov 2017-07-26 15:29:01 +07:00
commit 291e14a32a

View file

@ -483,8 +483,7 @@ proc godotVariantType*(T: typedesc[Table|TableRef]): VariantType {.inline.} =
VariantType.Dictionary VariantType.Dictionary
proc toGodot*[T: Table or TableRef](t: T): Variant = proc toGodot*[T: Table or TableRef](t: T): Variant =
var dict: Dictionary let dict = initDictionary()
initDictionary(dict)
mixin toGodot mixin toGodot
for k, v in t.pairs(): for k, v in t.pairs():
dict[toGodot(k)] = toGodot(v) dict[toGodot(k)] = toGodot(v)