Fixed O(n^2) performance bug in verilog preprocessor
authorClifford Wolf <clifford@clifford.at>
Fri, 22 Nov 2013 13:08:43 +0000 (14:08 +0100)
committerClifford Wolf <clifford@clifford.at>
Fri, 22 Nov 2013 13:08:43 +0000 (14:08 +0100)
frontends/verilog/preproc.cc

index 9f824526a38d5b022581fd3716b5c4b5342fffba..8d435d94051c1550c28bfe0cc5c66d3f0cac3a9a 100644 (file)
@@ -62,7 +62,7 @@ static void insert_input(std::string str)
 
 static char next_char()
 {
-       if (input_buffer.size() == 0)
+       if (input_buffer.empty())
                return 0;
 
        assert(input_buffer_charp <= input_buffer.front().size());