mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Merge pull request #1872 from boqwxp/cleanup_copy
Clean up private member usage in `passes/cmds/copy.cc`.
This commit is contained in:
		
						commit
						df95dc7d4a
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue