mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 13:29:12 +00:00 
			
		
		
		
	Using std::move() in SigSpec move constructor
This commit is contained in:
		
							parent
							
								
									7f3dc86ecd
								
							
						
					
					
						commit
						ddc5b41848
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -628,15 +628,15 @@ public:
 | 
			
		|||
	SigSpec(RTLIL::SigSpec &&other) {
 | 
			
		||||
		width_ = other.width_;
 | 
			
		||||
		hash_ = other.hash_;
 | 
			
		||||
		chunks_.swap(other.chunks_);
 | 
			
		||||
		bits_.swap(other.bits_);
 | 
			
		||||
		chunks_ = std::move(other.chunks_);
 | 
			
		||||
		bits_ = std::move(other.bits_);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	const RTLIL::SigSpec &operator=(RTLIL::SigSpec &&other) {
 | 
			
		||||
		width_ = other.width_;
 | 
			
		||||
		hash_ = other.hash_;
 | 
			
		||||
		chunks_.swap(other.chunks_);
 | 
			
		||||
		bits_.swap(other.bits_);
 | 
			
		||||
		chunks_ = std::move(other.chunks_);
 | 
			
		||||
		bits_ = std::move(other.bits_);
 | 
			
		||||
		return *this;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue