1
0
Fork 0

Give TRI_doc_mptr_copy_t a move constructor and move assignment operator.

This is in the hope of allowing the compiler to speed up some things.
This commit is contained in:
Max Neunhoeffer 2015-05-12 18:59:52 -07:00
parent 6a63da2548
commit ab0391dd03
1 changed files with 11 additions and 0 deletions

View File

@ -241,6 +241,17 @@ struct TRI_doc_mptr_copy_t : public TRI_doc_mptr_t {
return *this;
}
// Move semantics:
TRI_doc_mptr_copy_t (TRI_doc_mptr_copy_t&& that) {
copy(that);
}
TRI_doc_mptr_copy_t&& operator= (TRI_doc_mptr_copy_t&& that) {
copy(that);
return std::move(*this);
}
#ifndef TRI_ENABLE_MAINTAINER_MODE
inline void const* getDataPtr () const {
return _dataptr;