aboutsummaryrefslogtreecommitdiffstats
path: root/passes/cmds
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2020-04-06 11:03:46 +0000
committerGitHub <noreply@github.com>2020-04-06 11:03:46 +0000
commitdf95dc7d4a5cec9924dc09322aa17c168484fdf7 (patch)
tree3089b2edba287dd4d17e315126717994ac988630 /passes/cmds
parent41f0c384784ce57602d7128306001c396bf8eba2 (diff)
parent2dd09ab61115859267d418abbf42aa0086d8b7b1 (diff)
downloadyosys-df95dc7d4a5cec9924dc09322aa17c168484fdf7.tar.gz
yosys-df95dc7d4a5cec9924dc09322aa17c168484fdf7.tar.bz2
yosys-df95dc7d4a5cec9924dc09322aa17c168484fdf7.zip
Merge pull request #1872 from boqwxp/cleanup_copy
Clean up private member usage in `passes/cmds/copy.cc`.
Diffstat (limited to 'passes/cmds')
-rw-r--r--passes/cmds/copy.cc4
1 files changed, 2 insertions, 2 deletions
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();