BShape: add move construction and assignment support

GCC 2 support is also provided with `MoveFrom` method.

Change-Id: Ifedaf0b1406a5a2cb6bf3465249cea0f360e06d6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8531
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
X512
2024-11-11 16:56:19 +00:00
committed by waddlesplash
parent 80fcf2df19
commit e892302909
2 changed files with 41 additions and 0 deletions
+7
View File
@@ -50,6 +50,9 @@ class BShape : public BArchivable {
public:
BShape();
BShape(const BShape& other);
#if defined(__cplusplus) && __cplusplus >= 201103L
BShape(BShape&& other);
#endif
BShape(BMessage* archive);
virtual ~BShape();
@@ -58,11 +61,15 @@ public:
bool deep = true) const;
BShape& operator=(const BShape& other);
#if defined(__cplusplus) && __cplusplus >= 201103L
BShape& operator=(BShape&& other);
#endif
bool operator==(const BShape& other) const;
bool operator!=(const BShape& other) const;
void Clear();
void MoveFrom(BShape& other);
BRect Bounds() const;
BPoint CurrentPosition() const;