Skip to content

Commit

Permalink
[sipify] detect multiple variable declarations oneliners
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed May 22, 2017
1 parent 1df3c51 commit d93d0a8
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 @@ -579,10 +579,10 @@ sub detect_comment_block{
}

# skip non-method member declaration in non-public sections
# https://regex101.com/r/gUBZUk/8
# https://regex101.com/r/gUBZUk/9
if ( $SIP_RUN != 1 &&
$ACCESS[$#ACCESS] != PUBLIC &&
$line =~ m/^\s*(?:template<\w+>\s+)?(?:(const|mutable|static|friend|unsigned)\s+)*\w+(::\w+)?(<([\w<> *&,()]|::)+>)? \*?\w+( = (-?\d+(\.\d+)?|\w+(\([^()]+\))?)|\[\d+\])?;/){
$line =~ m/^\s*(?:template<\w+>\s+)?(?:(const|mutable|static|friend|unsigned)\s+)*\w+(::\w+)?(<([\w<> *&,()]|::)+>)?(,?\s+\*?\w+( = (-?\d+(\.\d+)?|\w+(\([^()]+\))?)|\[\d+\])?)+;/){
dbg_info("skip non-method member declaration in non-public sections");
next;
}
Expand Down

0 comments on commit d93d0a8

Please sign in to comment.