]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Use "str_equal" as equal_func for ArrayList<string> instances
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 7 May 2020 18:58:36 +0000 (20:58 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 18 May 2020 14:09:27 +0000 (16:09 +0200)
ccode/valaccodefile.vala
vala/valaclass.vala
vala/valacodecontext.vala
vala/valagenieparser.vala

index cf4870267170ec4b6cc74ecad235035137a917ae..e92051ce653f22f4d3cfac3676407fc4e32b598b 100644 (file)
@@ -107,7 +107,7 @@ public class Vala.CCodeFile {
        }
 
        public List<string> get_symbols () {
-               var symbols = new ArrayList<string> ();
+               var symbols = new ArrayList<string> (str_equal);
                get_symbols_from_fragment (symbols, type_member_declaration);
                return symbols;
        }
index 2ebcdb49f538e6783e0323a952b01a8e4814cb09..8324fa53bc830364e1eeea87613435ffe6292136 100644 (file)
@@ -714,7 +714,7 @@ public class Vala.Class : ObjectTypeSymbol {
                        }
                }
                /* check whether all prerequisites are met */
-               List<string> missing_prereqs = new ArrayList<string> ();
+               List<string> missing_prereqs = new ArrayList<string> (str_equal);
                foreach (TypeSymbol prereq in prerequisites) {
                        if (!is_a ((ObjectTypeSymbol) prereq)) {
                                missing_prereqs.insert (0, prereq.get_full_name ());
index 9b510182daf3cc7e2190a78da19959fddd54c10b..e5e5864575ecd3041be890f185393e24b5d35af7 100644 (file)
@@ -209,7 +209,7 @@ public class Vala.CodeContext {
 
        private List<SourceFile> source_files = new ArrayList<SourceFile> ();
        private Map<string,unowned SourceFile> source_files_map = new HashMap<string,unowned SourceFile> (str_hash, str_equal);
-       private List<string> c_source_files = new ArrayList<string> ();
+       private List<string> c_source_files = new ArrayList<string> (str_equal);
        private Namespace _root = new Namespace (null);
 
        private List<string> packages = new ArrayList<string> (str_equal);
index 65ae04bd28da4b4bcc483a61c211ae393c5676b4..72618867750d2e95efe1db2503ae23f5760f64ce 100644 (file)
@@ -1949,7 +1949,7 @@ public class Vala.Genie.Parser : CodeVisitor {
        }
 
        void parse_local_variable_declarations (Block block) throws ParseError {
-               var id_list = new ArrayList<string> ();
+               var id_list = new ArrayList<string> (str_equal);
                id_list.add (parse_identifier ());
                // Allow multiple declarations
                while (accept (TokenType.COMMA)) {