summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-11-26 17:15:38 +0100
committerJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-11-27 17:28:32 +0000
commit1dd1e48e7328db9d17de3e5f1bd6ca257f4ccee2 (patch)
treebb7364605d5d9eac143b54623080e4bb53d92c73 /bin
parentc06a39f6d2b23dad0535cf364c61f2572a7023d8 (diff)
Simplify tests whether to run header checks
Turn lists into hashes and check for existence of an element using key lookup. This leads to simpler testing code and is potentially faster. Change-Id: Ibbf4f03ec64d6c295cc5e1664dfa73cd0ce8c272 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/syncqt.pl12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/syncqt.pl b/bin/syncqt.pl
index 83e8350f81..25c129f268 100755
--- a/bin/syncqt.pl
+++ b/bin/syncqt.pl
@@ -81,6 +81,8 @@ our @qpa_headers = ();
# will be derived from sync.profile
our %reverse_classnames = ();
+my %ignore_for_include_check = ();
+my %ignore_for_qt_begin_namespace_check = ();
# global variables (modified by options)
my $isunix = 0;
@@ -801,6 +803,8 @@ loadSyncProfile(\$basedir, \$out_basedir);
@modules_to_sync = keys(%modules) if($#modules_to_sync == -1);
my %allmoduleheadersprivate = map { $_ => 1 } @allmoduleheadersprivate;
+%ignore_for_include_check = map { $_ => 1 } @ignore_for_include_check;
+%ignore_for_qt_begin_namespace_check = map { $_ => 1 } @ignore_for_qt_begin_namespace_check;
$isunix = checkUnix; #cache checkUnix
@@ -1157,12 +1161,8 @@ if($check_includes) {
$public_header = 0 if($header eq $_);
}
if($public_header) {
- foreach (@ignore_for_include_check) {
- $public_header = 0 if($header eq $_);
- }
- foreach(@ignore_for_qt_begin_namespace_check) {
- $header_skip_qt_begin_namespace_test = 1 if ($header eq $_);
- }
+ $public_header = 0 if ($ignore_for_include_check{$header});
+ $header_skip_qt_begin_namespace_test = 1 if ($ignore_for_qt_begin_namespace_check{$header});
}
}