Skip to content
Permalink
Browse files
[sipify] fix override removal
  • Loading branch information
3nids committed Apr 3, 2017
1 parent cca83b7 commit 169c60950dc2bc9338bdc52854bf85ceae0e7caa
Showing with 2 additions and 2 deletions.
  1. +2 −2 scripts/sipify.pl
@@ -287,7 +287,7 @@ sub processDoxygenLine

do {no warnings 'uninitialized';
# remove keywords
$line =~ s/\s*override( SIP_\w+(\(.+\))?)?;/$1;/;
$line =~ s/\s*\boverride\b//;
$line =~ s/^(\s*)?(const )?(virtual |static )?inline /$1$2$3/;
$line =~ s/\bnullptr\b/0/g;
$line =~ s/\s*=\s*default\b//g;
@@ -321,7 +321,7 @@ sub processDoxygenLine
}

# remove function bodies
if ( $line =~ m/^(\s*)?(const )?(virtual |static )?((\w+(<.*?>)?\s+(\*|&)?)?(\w+|operator.)\(.*?(\(.*\))*.*\)( (?:const|SIP_[A-Z_]*?))*)\s*(override)?\s*(\{.*\})?(?!;)(\s*\/\/.*)?$/ ){
if ( $line =~ m/^(\s*)?(const )?(virtual |static )?((\w+(<.*?>)?\s+(\*|&)?)?(\w+|operator.)\(.*?(\(.*\))*.*\)( (?:const|SIP_[A-Z_]*?))*)\s*(\{.*\})?(?!;)(\s*\/\/.*)?$/ ){
my $newline = "$1$2$3$4;\n";
if ($line !~ m/\{.*?\}$/){
$line = readline $header;

0 comments on commit 169c609

Please sign in to comment.