From: Alberto Gonzalez Date: Mon, 6 Apr 2020 08:26:10 +0000 (+0000) Subject: Clean up private member usage in `passes/cmds/copy.cc`. X-Git-Tag: working-ls180~685^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2dd09ab61115859267d418abbf42aa0086d8b7b1;p=yosys.git Clean up private member usage in `passes/cmds/copy.cc`. --- diff --git a/passes/cmds/copy.cc b/passes/cmds/copy.cc index acd2dba52..99f1f69cf 100644 --- a/passes/cmds/copy.cc +++ b/passes/cmds/copy.cc @@ -44,10 +44,10 @@ struct CopyPass : public Pass { std::string src_name = RTLIL::escape_id(args[1]); std::string trg_name = RTLIL::escape_id(args[2]); - if (design->modules_.count(src_name) == 0) + if (design->module(src_name) == nullptr) log_cmd_error("Can't find source module %s.\n", src_name.c_str()); - if (design->modules_.count(trg_name) != 0) + if (design->module(trg_name) != nullptr) log_cmd_error("Target module name %s already exists.\n", trg_name.c_str()); RTLIL::Module *new_mod = design->module(src_name)->clone();