[nostalgia/core/userland] Make Texture copy width and height on move
This commit is contained in:
		@@ -26,6 +26,23 @@ struct TextureBase {
 | 
				
			|||||||
	GLsizei width = 0;
 | 
						GLsizei width = 0;
 | 
				
			||||||
	GLsizei height = 0;
 | 
						GLsizei height = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						constexpr TextureBase() = default;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						constexpr TextureBase(TextureBase &&tb) noexcept {
 | 
				
			||||||
 | 
							width = tb.width;
 | 
				
			||||||
 | 
							height = tb.height;
 | 
				
			||||||
 | 
							tb.width = 0;
 | 
				
			||||||
 | 
							tb.height = 0;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						constexpr TextureBase &operator=(TextureBase &&tb) noexcept {
 | 
				
			||||||
 | 
							width = tb.width;
 | 
				
			||||||
 | 
							height = tb.height;
 | 
				
			||||||
 | 
							tb.width = 0;
 | 
				
			||||||
 | 
							tb.height = 0;
 | 
				
			||||||
 | 
							return *this;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -51,6 +68,7 @@ struct GLobject: public Base {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	GLobject &operator=(GLobject &&o) {
 | 
						GLobject &operator=(GLobject &&o) {
 | 
				
			||||||
		this->~GLobject();
 | 
							this->~GLobject();
 | 
				
			||||||
 | 
							Base::operator=(ox::move(o));
 | 
				
			||||||
		id = o.id;
 | 
							id = o.id;
 | 
				
			||||||
		o.id = 0;
 | 
							o.id = 0;
 | 
				
			||||||
		return *this;
 | 
							return *this;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user