From: Clifford Wolf Date: Fri, 22 Nov 2013 13:08:43 +0000 (+0100) Subject: Fixed O(n^2) performance bug in verilog preprocessor X-Git-Tag: yosys-0.2.0~334 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a362fd81ae450a263d8b65983d6f84e46247f722;p=yosys.git Fixed O(n^2) performance bug in verilog preprocessor --- 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());