Suppress false warning

This commit is contained in:
Ruslan Mustakov 2017-08-01 21:06:20 +07:00
commit 294c057ff9

View file

@ -355,12 +355,14 @@ template registerGodotField(classNameLit, classNameIdent, propNameLit,
let getFunc = GodotPropertyGetFunc( let getFunc = GodotPropertyGetFunc(
getFunc: getFuncIdent getFunc: getFuncIdent
) )
{.push warning[ProveInit]: off.} # false warning, Nim bug
var attr = GodotPropertyAttributes( var attr = GodotPropertyAttributes(
typ: ord(godotVariantType(propTypeIdent)), typ: ord(godotVariantType(propTypeIdent)),
hintString: hintTipLit.toGodotString(), hintString: hintTipLit.toGodotString(),
hint: GodotPropertyHint.hintIdent, hint: GodotPropertyHint.hintIdent,
usage: GodotPropertyUsageFlags.usageIdent usage: GodotPropertyUsageFlags.usageIdent
) )
{.push warning[ProveInit]: on.}
when hasDefaultValue: when hasDefaultValue:
attr.defaultValue = (defaultValueNode).toGodot() attr.defaultValue = (defaultValueNode).toGodot()
godotScriptRegisterProperty(getNativeLibHandle(), classNameLit, propNameLit, godotScriptRegisterProperty(getNativeLibHandle(), classNameLit, propNameLit,