Browse Source

Add private copy constructor / assignment where necessary to prevent warnings.

Lasse Öörni 11 years ago
parent
commit
0ee5f2fe1c

+ 11 - 0
Source/Engine/Container/HashMap.h

@@ -53,6 +53,13 @@ public:
         {
         }
         
+        /// Copy-construct.
+        KeyValue(const KeyValue& value) :
+            first_(value.first_),
+            second_(value.second_)
+        {
+        }
+        
         /// Test for equality with another pair.
         bool operator == (const KeyValue& rhs) const { return first_ == rhs.first_ && second_ == rhs.second_; }
         /// Test for inequality with another pair.
@@ -62,6 +69,10 @@ public:
         const T first_;
         /// Value.
         U second_;
+        
+    private:
+        /// Prevent assignment.
+        KeyValue& operator = (const KeyValue& rhs);
     };
     
     /// Hash map node.

+ 5 - 0
Source/Engine/Core/Mutex.h

@@ -56,6 +56,11 @@ public:
     ~MutexLock();
     
 private:
+    /// Prevent copy construction.
+    MutexLock(const MutexLock& rhs);
+    /// Prevent assignment.
+    MutexLock& operator = (const MutexLock& rhs);
+    
     /// Mutex reference.
     Mutex& mutex_;
 };

+ 6 - 0
Source/Engine/Graphics/OctreeQuery.h

@@ -62,6 +62,12 @@ public:
     unsigned char drawableFlags_;
     /// Drawable layers to include.
     unsigned viewMask_;
+    
+private:
+    /// Prevent copy construction.
+    OctreeQuery(const OctreeQuery& rhs);
+    /// Prevent assignment.
+    OctreeQuery& operator = (const OctreeQuery& rhs);
 };
 
 /// Point octree query.