From a362fd81ae450a263d8b65983d6f84e46247f722 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Fri, 22 Nov 2013 14:08:43 +0100 Subject: [PATCH] Fixed O(n^2) performance bug in verilog preprocessor --- frontends/verilog/preproc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontends/verilog/preproc.cc b/frontends/verilog/preproc.cc index 9f824526a..8d435d940 100644 --- a/frontends/verilog/preproc.cc +++ b/frontends/verilog/preproc.cc @@ -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()); -- 2.30.2