Index: Source/platform/Length.h |
diff --git a/Source/platform/Length.h b/Source/platform/Length.h |
index 9104f3b4e2d89567b61c989713778b1553eaac5f..40183bc8e6d57f4d79bb598814bf4b0dc6ae10d5 100644 |
--- a/Source/platform/Length.h |
+++ b/Source/platform/Length.h |
@@ -120,6 +120,27 @@ public: |
return *this; |
} |
+#if COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) |
+ Length(Length&& length) |
+ { |
+ memcpy(this, &length, sizeof(Length)); |
+ length.m_type = Auto; |
tkent
2014/05/27 00:13:29
Why do we need do length.m_type=Auto though |lengt
Inactive
2014/05/27 00:33:29
We basically want to make sure that |length|'s des
|
+ } |
+ |
+ Length& operator=(Length&& length) |
+ { |
+ if (this == &length) |
+ return *this; |
+ |
+ if (isCalculated()) |
+ decrementCalculatedRef(); |
+ |
+ memcpy(this, &length, sizeof(Length)); |
+ length.m_type = Auto; |
tkent
2014/05/27 00:13:29
Ditto.
I understand length.incrementCalculatedRef
|
+ return *this; |
+ } |
+#endif |
+ |
~Length() |
{ |
if (isCalculated()) |