]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Replace more public fields
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 14 Dec 2017 18:05:55 +0000 (19:05 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Fri, 15 Dec 2017 08:00:18 +0000 (09:00 +0100)
vala/valaattribute.vala
vala/valacodecontext.vala

index f1ef73f81298b670d43a48c80115656347f53c95..ed80d66d79691b9450e22d6b0b4a7b221412bdde 100644 (file)
@@ -34,7 +34,7 @@ public class Vala.Attribute : CodeNode {
        /**
         * Contains all specified attribute arguments.
         */
-       public Vala.Map<string,string> args = new HashMap<string,string> (str_hash, str_equal);
+       public Vala.Map<string,string> args { get; private set; }
 
        /**
         * Creates a new attribute.
@@ -46,6 +46,7 @@ public class Vala.Attribute : CodeNode {
        public Attribute (string name, SourceReference? source_reference = null) {
                this.name = name;
                this.source_reference = source_reference;
+               this.args = new HashMap<string,string> (str_hash, str_equal);
 
                if (!CodeContext.get ().deprecated) {
                        if (name == "Deprecated") {
index ba369a1679465b35c97e0d7dafdc88126405276f..404d9d8ae5d57fd22801132a4fe6cbc4d11ac9f0 100644 (file)
@@ -116,17 +116,17 @@ public class Vala.CodeContext {
        /**
         * List of directories where to find .vapi files.
         */
-       public string[] vapi_directories = {};
+       public string[] vapi_directories { get; set; default = {}; }
 
        /**
         * List of directories where to find .gir files.
         */
-       public string[] gir_directories = {};
+       public string[] gir_directories { get; set; default = {}; }
 
        /**
         * List of directories where to find .metadata files for .gir files.
         */
-       public string[] metadata_directories = {};
+       public string[] metadata_directories { get; set; default = {}; }
 
        /**
         * Produce debug information.
@@ -198,9 +198,9 @@ public class Vala.CodeContext {
 
        public bool run_output { get; set; }
 
-       public string[] gresources = {};
+       public string[] gresources { get; set; default = {}; }
 
-       public string[] gresources_directories = {};
+       public string[] gresources_directories { get; set; default = {}; }
 
        private List<SourceFile> source_files = new ArrayList<SourceFile> ();
        private List<string> c_source_files = new ArrayList<string> ();