mirror of
				https://git.zaroz.cloud/nintendo-back-up/yuzu/yuzu-mainline.git
				synced 2025-03-21 01:53:15 +00:00 
			
		
		
		
	Merge pull request #1392 from lioncash/move
backend: defaulted move constructor/assignment
This commit is contained in:
		
						commit
						7400100da7
					
				@ -27,25 +27,9 @@ struct Entry {
 | 
				
			|||||||
    std::string message;
 | 
					    std::string message;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Entry() = default;
 | 
					    Entry() = default;
 | 
				
			||||||
 | 
					    Entry(Entry&& o) = default;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // TODO(yuriks) Use defaulted move constructors once MSVC supports them
 | 
					    Entry& operator=(Entry&& o) = default;
 | 
				
			||||||
#define MOVE(member) member(std::move(o.member))
 | 
					 | 
				
			||||||
    Entry(Entry&& o)
 | 
					 | 
				
			||||||
        : MOVE(timestamp), MOVE(log_class), MOVE(log_level),
 | 
					 | 
				
			||||||
        MOVE(location), MOVE(message)
 | 
					 | 
				
			||||||
    {}
 | 
					 | 
				
			||||||
#undef MOVE
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Entry& operator=(const Entry&& o) {
 | 
					 | 
				
			||||||
#define MOVE(member) member = std::move(o.member)
 | 
					 | 
				
			||||||
        MOVE(timestamp);
 | 
					 | 
				
			||||||
        MOVE(log_class);
 | 
					 | 
				
			||||||
        MOVE(log_level);
 | 
					 | 
				
			||||||
        MOVE(location);
 | 
					 | 
				
			||||||
        MOVE(message);
 | 
					 | 
				
			||||||
#undef MOVE
 | 
					 | 
				
			||||||
        return *this;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user