Changeset 11098 for code/trunk/src/libraries/util/MultiType.h
- Timestamp:
- Jan 26, 2016, 8:32:16 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/util/MultiType.h
r11071 r11098 100 100 #include <cassert> 101 101 #include <string> 102 #include <utility> 102 103 #include <OgreVector2.h> 103 104 #include <OgreVector3.h> … … 310 311 /// Copyconstructor: Assigns value and type of the other MultiType. 311 312 inline MultiType(const MultiType& other) : value_(nullptr) { this->set(other); } 313 /// Moveconstructor: Moves the value and its type from the other MultiType 314 inline MultiType(MultiType&& other) : value_(nullptr) { std::swap(this->value_, other.value_); }; 312 315 313 316 /// Destructor: Deletes the MT_Value. … … 320 323 /// Assigns the value of the other MultiType and converts it to the current type of the MultiType. 321 324 inline MultiType& operator=(const MultiType& other) { this->set(other); return (*this); } 325 /// Moves the value and the type of the other MultiType to this one. 326 inline MultiType& operator=(MultiType&& other) { std::swap(this->value_, other.value_); return (*this); } 322 327 323 328 /// Assigns the given value and converts it to the current type.
Note: See TracChangeset
for help on using the changeset viewer.