]> 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>
Fri, 8 May 2020 11:19:48 +0000 (13:19 +0200)
ccode/valaccodefile.vala
vala/valaclass.vala
vala/valacodecontext.vala
vala/valagenieparser.vala

index 7145946b12918bc333bfa8d719c9b31c5004e3b6..b04b73d1015e91c872d7a2adead457fde1b221fd 100644 (file)
@@ -108,7 +108,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 9d71a4239cafa5fa1fb362e25bb9fe6831842fe7..c3cc48f5514c1b21fa7521fa7c909f88d151980b 100644 (file)
@@ -722,7 +722,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 6001c901af50c57d51c65600e5f49ea0ff43b15c..6b666527428e9b31b4d7e10d430cbf0d9be9ee38 100644 (file)
@@ -205,7 +205,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 6e6e9cd5c21ab215abe37316f6a25f913d1dc790..45e0d97290beb317e37d230282c5cf18e082857c 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)) {