Browse Source

Fix compilation issue with --nothing on MSVC

I have no idea why this error happens, but it does not seem worth the effort to investigate further, so I'm just reverting the previous change to this file.
rdb 7 years ago
parent
commit
d13464104c
1 changed files with 15 additions and 0 deletions
  1. 15 0
      dtool/src/dtoolbase/pvector.h

+ 15 - 0
dtool/src/dtoolbase/pvector.h

@@ -46,9 +46,24 @@ public:
   typedef TYPENAME base_class::size_type size_type;
 
   explicit pvector(TypeHandle type_handle = pvector_type_handle) : base_class(allocator(type_handle)) { }
+  pvector(const pvector<Type> &copy) : base_class(copy) { }
   explicit pvector(size_type n, TypeHandle type_handle = pvector_type_handle) : base_class(n, Type(), allocator(type_handle)) { }
   explicit pvector(size_type n, const Type &value, TypeHandle type_handle = pvector_type_handle) : base_class(n, value, allocator(type_handle)) { }
   pvector(const Type *begin, const Type *end, TypeHandle type_handle = pvector_type_handle) : base_class(begin, end, allocator(type_handle)) { }
+
+#ifdef USE_MOVE_SEMANTICS
+  pvector(pvector<Type> &&from) NOEXCEPT : base_class(move(from)) {};
+
+  pvector<Type> &operator =(pvector<Type> &&from) NOEXCEPT {
+    base_class::operator =(move(from));
+    return *this;
+  }
+#endif
+
+  pvector<Type> &operator =(const pvector<Type> &copy) {
+    base_class::operator =(copy);
+    return *this;
+  }
 };
 
 #endif  // USE_STL_ALLOCATOR