Skip to content

Commit ebd8fa8

Browse files
authored
Merge pull request #370 from hzeller/20220719-use-canonical-empty-string-test
Use a canonical way to test for an empty string.
2 parents 2a691f0 + 582af47 commit ebd8fa8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ql-qlf-plugin/synth_quicklogic.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ struct SynthQuickLogicPass : public ScriptPass {
314314
run("techmap -map +/mul2dsp.v [...]", " (for qlf_k6n10f if not -no_dsp)");
315315
run("chtype -set $mul t:$__soft_mul", " (for qlf_k6n10f if not -no_dsp)");
316316
run("techmap -map +/quicklogic/" + family + "/dsp_map.v", "(for qlf_k6n10f if not -no_dsp)");
317-
if (use_dsp_cfg_params == "")
317+
if (use_dsp_cfg_params.empty())
318318
run("techmap -map +/quicklogic/" + family + "/dsp_map.v -D USE_DSP_CFG_PARAMS=0", "(for qlf_k6n10f if not -no_dsp)");
319319
else
320320
run("techmap -map +/quicklogic/" + family + "/dsp_map.v -D USE_DSP_CFG_PARAMS=1", "(for qlf_k6n10f if not -no_dsp)");
@@ -334,7 +334,7 @@ struct SynthQuickLogicPass : public ScriptPass {
334334
rule.a_maxwidth, rule.b_maxwidth, rule.a_minwidth, rule.b_minwidth, rule.type.c_str()));
335335
run("chtype -set $mul t:$__soft_mul");
336336
}
337-
if (use_dsp_cfg_params == "")
337+
if (use_dsp_cfg_params.empty())
338338
run("techmap -map +/quicklogic/" + family + "/dsp_map.v -D USE_DSP_CFG_PARAMS=0");
339339
else
340340
run("techmap -map +/quicklogic/" + family + "/dsp_map.v -D USE_DSP_CFG_PARAMS=1");

systemverilog-plugin/UhdmAst.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3644,7 +3644,7 @@ void UhdmAst::process_repeat()
36443644
if (node->type != AST::AST_BLOCK) {
36453645
node = new AST::AstNode(AST::AST_BLOCK, node);
36463646
}
3647-
if (node->str == "") {
3647+
if (node->str.empty()) {
36483648
node->str = loop->str; // Needed in simplify step
36493649
}
36503650
loop->children.push_back(node);

0 commit comments

Comments
 (0)