Browse Source

Clang-Tidy - modernize-use-equals-delete.

Yao Wei Tjong 姚伟忠 8 years ago
parent
commit
c999210676

+ 2 - 2
Source/Urho3D/Container/Allocator.h

@@ -116,9 +116,9 @@ public:
 
 private:
     /// Prevent copy construction.
-    Allocator(const Allocator<T>& rhs);
+    Allocator(const Allocator<T>& rhs) = delete;
     /// Prevent assignment.
-    Allocator<T>& operator =(const Allocator<T>& rhs);
+    Allocator<T>& operator =(const Allocator<T>& rhs) = delete;
 
     /// Allocator block.
     AllocatorBlock* allocator_;

+ 1 - 1
Source/Urho3D/Container/HashMap.h

@@ -77,7 +77,7 @@ public:
 
     private:
         /// Prevent assignment.
-        KeyValue& operator =(const KeyValue& rhs);
+        KeyValue& operator =(const KeyValue& rhs) = delete;
     };
 
     /// Hash map node.

+ 2 - 2
Source/Urho3D/Container/Ptr.h

@@ -525,8 +525,8 @@ template<class T> inline void CheckedDelete(T* x)
 template <class T> class UniquePtr
 {
     // Make non-copyable
-    UniquePtr(const UniquePtr&);
-    UniquePtr& operator=(const UniquePtr&);
+    UniquePtr(const UniquePtr&) = delete;
+    UniquePtr& operator=(const UniquePtr&) = delete;
 
 public:
     /// Construct empty.

+ 4 - 4
Source/Urho3D/Graphics/OctreeQuery.h

@@ -63,9 +63,9 @@ public:
 
 private:
     /// Prevent copy construction.
-    OctreeQuery(const OctreeQuery& rhs);
+    OctreeQuery(const OctreeQuery& rhs) = delete;
     /// Prevent assignment.
-    OctreeQuery& operator =(const OctreeQuery& rhs);
+    OctreeQuery& operator =(const OctreeQuery& rhs) = delete;
 };
 
 /// Point octree query.
@@ -249,9 +249,9 @@ public:
 
 private:
     /// Prevent copy construction.
-    RayOctreeQuery(const RayOctreeQuery& rhs);
+    RayOctreeQuery(const RayOctreeQuery& rhs) = delete;
     /// Prevent assignment.
-    RayOctreeQuery& operator =(const RayOctreeQuery& rhs);
+    RayOctreeQuery& operator =(const RayOctreeQuery& rhs) = delete;
 };
 
 class URHO3D_API AllContentOctreeQuery : public OctreeQuery