Skip to content

Commit

Permalink
[sipify] fix detection of method signature with following body
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed May 2, 2017
1 parent 1d71e36 commit b77b496
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/sipify.pl
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ sub dbg_info
}

sub remove_constructor_or_body {
# https://regex101.com/r/ZaP3tC/1
# https://regex101.com/r/ZaP3tC/3
do {no warnings 'uninitialized';
if ( $line =~ m/^(\s*)?(explicit )?(virtual )?(static |const )*(([\w:]+(<.*?>)?\s+(\*|&)?)?(~?\w+|operator.{1,2})\(([\w=()\/ ,&*<>-]|::)*\)( (?:const|SIP_[A-Z_]*?))*)\s*((\s*[:,]\s+\w+\(.*\))*\s*\{.*\};?|(?!;))(\s*\/\/.*)?$/
if ( $line =~ m/^(\s*)?(explicit )?(virtual )?(static |const )*(([\w:]+(<.*?>)?\s+(\*|&)?)?(~?\w+|operator.{1,2})\(([\w=()\/ ,&*<>."-]|::)*\)( (?:const|SIP_[A-Z_]*?))*)\s*((\s*[:,]\s+\w+\(.*\))*\s*\{.*\};?|(?!;))(\s*\/\/.*)?$/
|| $line =~ m/SIP_SKIP\s*(?!;)\s*(\/\/.*)?$/ ){
dbg_info("remove constructor definition, function bodies, member initializing list");
my $newline = "$1$2$3$4$5;";
Expand Down

0 comments on commit b77b496

Please sign in to comment.