Cleanup, don't capture group in regex
authorVincent Tondellier <tonton+hg@team1664.org>
Sun, 14 Feb 2016 23:15:36 +0100
changeset 101 8e0a9f88fb47
parent 100 4dae01f2beee
child 102 396528bdb9ad
Cleanup, don't capture group in regex
lib/CrashTest/Plugin/CrashSignatureExtractor/C_Cpp.pm
--- a/lib/CrashTest/Plugin/CrashSignatureExtractor/C_Cpp.pm	Sun Feb 14 22:42:29 2016 +0100
+++ b/lib/CrashTest/Plugin/CrashSignatureExtractor/C_Cpp.pm	Sun Feb 14 23:15:36 2016 +0100
@@ -38,7 +38,6 @@
         my $short = _extract_function_name($frame->function);
         $short =~ s/^$_// foreach (@{$self->config->{RemoveNamespace}});
         push @short_frames, $short;
-        # . "@" . $frame->function_offset;
     }
 
     return \@short_frames;
@@ -61,7 +60,7 @@
         # the complex prefix is here to match normal function names (the last '[^<\(]*' part)
         # but also the complex case of unbalanced <> like in:
         # std::basic_ostream<A, B>& operator<< <A, B >(std::basic_ostream<A, B>&, T const&)
-        my ($str, $next, $prefix) = extract_bracketed($text, '<(', qr/([^<\(]*operator[<>]{1,2})?[^<\(]*/);
+        my ($str, $next, $prefix) = extract_bracketed($text, '<(', qr/(?:[^<\(]*operator[<>]{1,2})?[^<\(]*/);
         if($str) {
             $short_signature .= $prefix;
             $text = $next;