| Index: Source/platform/Length.h
|
| diff --git a/Source/platform/Length.h b/Source/platform/Length.h
|
| index 9104f3b4e2d89567b61c989713778b1553eaac5f..ac20386466be09ee8991a3ced3a60c7c8afc6f49 100644
|
| --- a/Source/platform/Length.h
|
| +++ b/Source/platform/Length.h
|
| @@ -120,6 +120,36 @@ public:
|
| return *this;
|
| }
|
|
|
| +#if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES)
|
| + Length(Length&& length)
|
| + {
|
| + memcpy(this, &length, sizeof(Length));
|
| +
|
| + // Reset |length|'s type to Auto to make sure its destructor
|
| + // won't call decrementCalculatedRef() as we don't call
|
| + // incrementCalculatedRef() here.
|
| + length.m_type = Auto;
|
| + }
|
| +
|
| + Length& operator=(Length&& length)
|
| + {
|
| + if (this == &length)
|
| + return *this;
|
| +
|
| + if (isCalculated())
|
| + decrementCalculatedRef();
|
| +
|
| + memcpy(this, &length, sizeof(Length));
|
| +
|
| + // Reset |length|'s type to Auto to make sure its destructor
|
| + // won't call decrementCalculatedRef() as we don't call
|
| + // incrementCalculatedRef() here.
|
| + length.m_type = Auto;
|
| +
|
| + return *this;
|
| + }
|
| +#endif
|
| +
|
| ~Length()
|
| {
|
| if (isCalculated())
|
|
|