From: Dan Breslau Date: Thu, 21 Jul 2016 20:33:33 +0000 (-0400) Subject: Allow compilation under later versions of valac (fixed empty array initialization) X-Git-Tag: v0.9.6~16 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=moonshot-ui.git;a=commitdiff_plain;h=5f5090151c25facc82635d2a560cee82268f964c Allow compilation under later versions of valac (fixed empty array initialization) --- diff --git a/src/moonshot-id.vala b/src/moonshot-id.vala index 2dc9ac2..eae892f 100644 --- a/src/moonshot-id.vala +++ b/src/moonshot-id.vala @@ -92,16 +92,16 @@ public class IdCard : Object public string issuer { get; set; default = ""; } - private Rule[] _rules = {}; + private Rule[] _rules = new Rule[0]; public Rule[] rules { get {return _rules;} - internal set {_rules = value ?? {};} + internal set {_rules = value ?? new Rule[0] ;} } - private string[] _services = {}; + private string[] _services = new string[0]; public string[] services { get {return _services;} - internal set {_services = value ?? {};} + internal set {_services = value ?? new string[0] ;} } public bool temporary {get; set; default = false; } diff --git a/src/moonshot-provisioning-common.vala b/src/moonshot-provisioning-common.vala index a0c39c3..10e2366 100644 --- a/src/moonshot-provisioning-common.vala +++ b/src/moonshot-provisioning-common.vala @@ -222,7 +222,7 @@ namespace WebProvisioning public IdCard[] cards { get {return _cards;} - private set {_cards = value ?? {};} + private set {_cards = value ?? new IdCard[0] ;} } public Parser(string path) {