mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	Added RTLIL::SigSpec move constructor and move assignment operator
This commit is contained in:
		
							parent
							
								
									c91570bde3
								
							
						
					
					
						commit
						7f3dc86ecd
					
				
					 1 changed files with 15 additions and 0 deletions
				
			
		|  | @ -625,6 +625,21 @@ public: | ||||||
| 	SigSpec(std::vector<RTLIL::SigBit> bits); | 	SigSpec(std::vector<RTLIL::SigBit> bits); | ||||||
| 	SigSpec(std::set<RTLIL::SigBit> bits); | 	SigSpec(std::set<RTLIL::SigBit> bits); | ||||||
| 
 | 
 | ||||||
|  | 	SigSpec(RTLIL::SigSpec &&other) { | ||||||
|  | 		width_ = other.width_; | ||||||
|  | 		hash_ = other.hash_; | ||||||
|  | 		chunks_.swap(other.chunks_); | ||||||
|  | 		bits_.swap(other.bits_); | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	const RTLIL::SigSpec &operator=(RTLIL::SigSpec &&other) { | ||||||
|  | 		width_ = other.width_; | ||||||
|  | 		hash_ = other.hash_; | ||||||
|  | 		chunks_.swap(other.chunks_); | ||||||
|  | 		bits_.swap(other.bits_); | ||||||
|  | 		return *this; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	inline const std::vector<RTLIL::SigChunk> &chunks() const { pack(); return chunks_; } | 	inline const std::vector<RTLIL::SigChunk> &chunks() const { pack(); return chunks_; } | ||||||
| 	inline const std::vector<RTLIL::SigBit> &bits() const { inline_unpack(); return bits_; } | 	inline const std::vector<RTLIL::SigBit> &bits() const { inline_unpack(); return bits_; } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue