mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
[sipify] fix override removal
This commit is contained in:
parent
cca83b7599
commit
169c60950d
@ -287,7 +287,7 @@ while(!eof $header){
|
|||||||
|
|
||||||
do {no warnings 'uninitialized';
|
do {no warnings 'uninitialized';
|
||||||
# remove keywords
|
# 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/^(\s*)?(const )?(virtual |static )?inline /$1$2$3/;
|
||||||
$line =~ s/\bnullptr\b/0/g;
|
$line =~ s/\bnullptr\b/0/g;
|
||||||
$line =~ s/\s*=\s*default\b//g;
|
$line =~ s/\s*=\s*default\b//g;
|
||||||
@ -321,7 +321,7 @@ while(!eof $header){
|
|||||||
}
|
}
|
||||||
|
|
||||||
# remove function bodies
|
# 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";
|
my $newline = "$1$2$3$4;\n";
|
||||||
if ($line !~ m/\{.*?\}$/){
|
if ($line !~ m/\{.*?\}$/){
|
||||||
$line = readline $header;
|
$line = readline $header;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user