SonarOpenCommunity / sonar-cxx

Use of len(seq) - 1 to get last element of an iterable PTC-W0044
Performance
Major
6 months ago3 years old
Use allmethod[-1] instead of allmethod[len(allmethod) - 1] to get the last element
 94                        
 95        allmethod += line 
 96
 97        if allmethod[len(allmethod) - 1] == ")": 98            methodcomplete = 1
 99        
100        # clear the line