Skip to content

Commit 6bb08d8

Browse files
author
jef
committed
make std:: optional when converting iostream stuff to QgsDebugMsg
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11985 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 8cc6b3f commit 6bb08d8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

scripts/qgsloggermig.pl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
$lastinclude = scalar(@file)+1;
6161
}
6262

63-
if(/std::(cout|cerr)/) {
63+
if(/(std::)?(cout|cerr)/) {
6464
die "nested? [$file]" if defined $output;
6565
$output = "";
6666
}
@@ -72,7 +72,7 @@
7272
$output =~ s/$le/\n/g;
7373

7474
my $level = 0;
75-
if($output =~ /^\s*\/\/\s*(std::(cout|cerr))/) {
75+
if($output =~ /^\s*\/\/\s*((std::)?(cout|cerr))/) {
7676
$level = 3;
7777
$output =~ s/^\s*\/\///;
7878
$output =~ s/\n\s*\/\//\n /g;
@@ -89,7 +89,7 @@
8989
next;
9090
}
9191
92-
unless( $arr[0] =~ /^std::(cout|cerr)$/ ) {
92+
unless( $arr[0] =~ /^(std::)?(cout|cerr)$/ ) {
9393
die "std::(cerr|cout) expected [$file]: |" . $arr[0] . "|";
9494
}
9595
@@ -102,14 +102,14 @@
102102
$arr[-1] = "std::endl;";
103103
}
104104
105-
if( $arr[-1] =~ /^std::flush;$/ &&
106-
$arr[-2] =~ /^std::endl$/ ) {
105+
if( $arr[-1] =~ /^(std::)?flush;$/ &&
106+
$arr[-2] =~ /^(std::)?endl$/ ) {
107107
pop @arr;
108108
pop @arr;
109109
push @arr, "std::endl;";
110110
}
111111
112-
unless( $arr[-1] =~ /^std::endl;$/ ) {
112+
unless( $arr[-1] =~ /^(std::)?endl;$/ ) {
113113
die "std::endl; expected [$file]: |" . $arr[-1] . "|";
114114
}
115115

0 commit comments

Comments
 (0)