From 5f5090151c25facc82635d2a560cee82268f964c Mon Sep 17 00:00:00 2001 From: Dan Breslau Date: Thu, 21 Jul 2016 16:33:33 -0400 Subject: [PATCH] Allow compilation under later versions of valac (fixed empty array initialization) --- src/moonshot-id.vala | 8 ++++---- src/moonshot-provisioning-common.vala | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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) { -- 2.1.4