diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-08-16 16:51:22 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-08-16 16:51:22 -0700 |
commit | 24c934f1af3859fe64ff4fb87a2a3de97695cde4 (patch) | |
tree | 131c64cee5a0cf09adc68b32f25e06a9da668ad0 /techlibs/ice40/ice40_braminit.cc | |
parent | 1c9f3fadb9f60653fc9d1d7d72ba22033e077468 (diff) | |
parent | 5abe133323b2a6a46959f796c4730b2d70cdea26 (diff) | |
download | yosys-24c934f1af3859fe64ff4fb87a2a3de97695cde4.tar.gz yosys-24c934f1af3859fe64ff4fb87a2a3de97695cde4.tar.bz2 yosys-24c934f1af3859fe64ff4fb87a2a3de97695cde4.zip |
Merge branch 'eddie/abc9_refactor' into xaig_dff
Diffstat (limited to 'techlibs/ice40/ice40_braminit.cc')
-rw-r--r-- | techlibs/ice40/ice40_braminit.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/techlibs/ice40/ice40_braminit.cc b/techlibs/ice40/ice40_braminit.cc index 4fa6b0792..1a139ffea 100644 --- a/techlibs/ice40/ice40_braminit.cc +++ b/techlibs/ice40/ice40_braminit.cc @@ -69,13 +69,13 @@ static void run_ice40_braminit(Module *module) for (int i = 0; i < GetSize(line); i++) { - if (in_comment && line.substr(i, 2) == "*/") { + if (in_comment && line.compare(i, 2, "*/") == 0) { line[i] = ' '; line[i+1] = ' '; in_comment = false; continue; } - if (!in_comment && line.substr(i, 2) == "/*") + if (!in_comment && line.compare(i, 2, "/*") == 0) in_comment = true; if (in_comment) line[i] = ' '; @@ -87,7 +87,7 @@ static void run_ice40_braminit(Module *module) long value; token = next_token(line, " \t\r\n"); - if (token.empty() || token.substr(0, 2) == "//") + if (token.empty() || token.compare(0, 2, "//") == 0) break; if (token[0] == '@') { |