@@ -6148,21 +6148,21 @@ def CheckRedundantVirtual(filename, clean_lines, linenum, error):
6148
6148
if end_col < 0 :
6149
6149
return # Couldn't find end of parameter list, give up
6150
6150
6151
- # # Look for "override" or "final" after the parameter list
6152
- # # (possibly on the next few lines).
6153
- # for i in xrange(end_line, min(end_line + 3, clean_lines.NumLines())):
6154
- # line = clean_lines.elided[i][end_col:]
6155
- # match = Search(r'\b(override|final)\b', line)
6156
- # if match:
6157
- # error(filename, linenum, 'readability/inheritance', 4,
6158
- # ('"virtual" is redundant since function is '
6159
- # 'already declared as "%s"' % match.group(1)))
6160
- #
6161
- # # Set end_col to check whole lines after we are done with the
6162
- # # first line.
6163
- # end_col = 0
6164
- # if Search(r'[^\w]\s*$', line):
6165
- # break
6151
+ # Look for "override" or "final" after the parameter list
6152
+ # (possibly on the next few lines).
6153
+ for i in xrange (end_line , min (end_line + 3 , clean_lines .NumLines ())):
6154
+ line = clean_lines .elided [i ][end_col :]
6155
+ match = Search (r'\b(override|final)\b' , line )
6156
+ if match :
6157
+ error (filename , linenum , 'readability/inheritance' , 4 ,
6158
+ ('"virtual" is redundant since function is '
6159
+ 'already declared as "%s"' % match .group (1 )))
6160
+
6161
+ # Set end_col to check whole lines after we are done with the
6162
+ # first line.
6163
+ end_col = 0
6164
+ if Search (r'[^\w]\s*$' , line ):
6165
+ break
6166
6166
6167
6167
6168
6168
0 commit comments