Skip to content
Permalink
Browse files

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
  • Loading branch information
jef
jef committed Nov 7, 2009
1 parent 8cc6b3f commit 6bb08d8427334ae3401f17abeadcae1cde414c7f
Showing with 6 additions and 6 deletions.
  1. +6 −6 scripts/qgsloggermig.pl
@@ -60,7 +60,7 @@
$lastinclude = scalar(@file)+1;
}

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

my $level = 0;
if($output =~ /^\s*\/\/\s*(std::(cout|cerr))/) {
if($output =~ /^\s*\/\/\s*((std::)?(cout|cerr))/) {
$level = 3;
$output =~ s/^\s*\/\///;
$output =~ s/\n\s*\/\//\n /g;
@@ -89,7 +89,7 @@
next;
}
unless( $arr[0] =~ /^std::(cout|cerr)$/ ) {
unless( $arr[0] =~ /^(std::)?(cout|cerr)$/ ) {
die "std::(cerr|cout) expected [$file]: |" . $arr[0] . "|";
}
@@ -102,14 +102,14 @@
$arr[-1] = "std::endl;";
}
if( $arr[-1] =~ /^std::flush;$/ &&
$arr[-2] =~ /^std::endl$/ ) {
if( $arr[-1] =~ /^(std::)?flush;$/ &&
$arr[-2] =~ /^(std::)?endl$/ ) {
pop @arr;
pop @arr;
push @arr, "std::endl;";
}
unless( $arr[-1] =~ /^std::endl;$/ ) {
unless( $arr[-1] =~ /^(std::)?endl;$/ ) {
die "std::endl; expected [$file]: |" . $arr[-1] . "|";
}

0 comments on commit 6bb08d8

Please sign in to comment.
You can’t perform that action at this time.