Browse Source

Clang-Tidy - modernize-use-equals-default.

Yao Wei Tjong 姚伟忠 8 years ago
parent
commit
c99c5fbf64
100 changed files with 149 additions and 530 deletions
  1. 1 3
      Source/Samples/18_CharacterDemo/CharacterDemo.cpp
  2. 1 3
      Source/Samples/18_CharacterDemo/Touch.cpp
  3. 1 3
      Source/Samples/46_RaycastVehicle/Vehicle.cpp
  4. 0 4
      Source/Samples/Utilities2D/Sample2D.cpp
  5. 1 1
      Source/Samples/Utilities2D/Sample2D.h
  6. 1 1
      Source/Tools/SpritePacker/SpritePacker.cpp
  7. 1 1
      Source/Urho3D/AngelScript/ScriptEventListener.h
  8. 1 3
      Source/Urho3D/Audio/BufferedSoundStream.cpp
  9. 1 3
      Source/Urho3D/Audio/Sound.cpp
  10. 1 3
      Source/Urho3D/Audio/SoundListener.cpp
  11. 2 4
      Source/Urho3D/Audio/SoundStream.cpp
  12. 3 9
      Source/Urho3D/Container/HashMap.h
  13. 3 9
      Source/Urho3D/Container/HashSet.h
  14. 3 9
      Source/Urho3D/Container/List.h
  15. 1 3
      Source/Urho3D/Container/Pair.h
  16. 2 6
      Source/Urho3D/Container/Vector.h
  17. 1 3
      Source/Urho3D/Core/Object.cpp
  18. 1 1
      Source/Urho3D/Core/Object.h
  19. 1 5
      Source/Urho3D/Core/Spline.cpp
  20. 6 13
      Source/Urho3D/Core/Variant.h
  21. 1 3
      Source/Urho3D/Engine/Engine.cpp
  22. 1 3
      Source/Urho3D/Graphics/Animation.cpp
  23. 1 3
      Source/Urho3D/Graphics/AnimationController.cpp
  24. 5 9
      Source/Urho3D/Graphics/AnimationState.cpp
  25. 3 9
      Source/Urho3D/Graphics/Batch.h
  26. 1 3
      Source/Urho3D/Graphics/BillboardSet.cpp
  27. 1 3
      Source/Urho3D/Graphics/Camera.cpp
  28. 1 3
      Source/Urho3D/Graphics/CustomGeometry.cpp
  29. 1 3
      Source/Urho3D/Graphics/DebugRenderer.cpp
  30. 2 6
      Source/Urho3D/Graphics/DebugRenderer.h
  31. 1 3
      Source/Urho3D/Graphics/DecalSet.cpp
  32. 1 3
      Source/Urho3D/Graphics/DecalSet.h
  33. 2 15
      Source/Urho3D/Graphics/Drawable.cpp
  34. 3 5
      Source/Urho3D/Graphics/Geometry.cpp
  35. 1 3
      Source/Urho3D/Graphics/Light.cpp
  36. 3 9
      Source/Urho3D/Graphics/Light.h
  37. 4 14
      Source/Urho3D/Graphics/Material.cpp
  38. 1 3
      Source/Urho3D/Graphics/Model.cpp
  39. 1 3
      Source/Urho3D/Graphics/OcclusionBuffer.cpp
  40. 1 3
      Source/Urho3D/Graphics/OctreeQuery.h
  41. 1 3
      Source/Urho3D/Graphics/ParticleEffect.cpp
  42. 1 3
      Source/Urho3D/Graphics/ParticleEmitter.cpp
  43. 2 6
      Source/Urho3D/Graphics/RenderPath.cpp
  44. 1 3
      Source/Urho3D/Graphics/Renderer.cpp
  45. 1 3
      Source/Urho3D/Graphics/RibbonTrail.cpp
  46. 1 3
      Source/Urho3D/Graphics/Skeleton.cpp
  47. 1 3
      Source/Urho3D/Graphics/Skybox.cpp
  48. 1 3
      Source/Urho3D/Graphics/StaticModel.cpp
  49. 1 3
      Source/Urho3D/Graphics/StaticModelGroup.cpp
  50. 2 6
      Source/Urho3D/Graphics/Technique.cpp
  51. 1 3
      Source/Urho3D/Graphics/Terrain.cpp
  52. 1 3
      Source/Urho3D/Graphics/TerrainPatch.cpp
  53. 1 3
      Source/Urho3D/Graphics/Texture.cpp
  54. 1 3
      Source/Urho3D/Graphics/View.cpp
  55. 1 3
      Source/Urho3D/Graphics/Viewport.cpp
  56. 1 3
      Source/Urho3D/Graphics/Zone.cpp
  57. 1 3
      Source/Urho3D/IK/IKConstraint.cpp
  58. 1 1
      Source/Urho3D/IO/AbstractFile.h
  59. 1 3
      Source/Urho3D/IO/Deserializer.cpp
  60. 1 3
      Source/Urho3D/IO/Log.h
  61. 1 3
      Source/Urho3D/IO/PackageFile.cpp
  62. 1 3
      Source/Urho3D/IO/Serializer.cpp
  63. 1 3
      Source/Urho3D/IO/VectorBuffer.cpp
  64. 1 3
      Source/Urho3D/Input/Controls.cpp
  65. 1 3
      Source/Urho3D/LuaScript/LuaFile.cpp
  66. 1 3
      Source/Urho3D/LuaScript/LuaScriptEventInvoker.cpp
  67. 1 1
      Source/Urho3D/LuaScript/LuaScriptEventListener.h
  68. 2 15
      Source/Urho3D/Math/Color.h
  69. 1 3
      Source/Urho3D/Math/Frustum.cpp
  70. 2 15
      Source/Urho3D/Math/Matrix2.h
  71. 2 25
      Source/Urho3D/Math/Matrix3.h
  72. 2 13
      Source/Urho3D/Math/Plane.h
  73. 1 3
      Source/Urho3D/Math/Polyhedron.cpp
  74. 1 3
      Source/Urho3D/Math/Polyhedron.h
  75. 3 14
      Source/Urho3D/Math/Ray.h
  76. 2 11
      Source/Urho3D/Math/Rect.h
  77. 2 11
      Source/Urho3D/Math/Sphere.h
  78. 2 9
      Source/Urho3D/Math/StringHash.h
  79. 4 22
      Source/Urho3D/Math/Vector2.h
  80. 4 26
      Source/Urho3D/Math/Vector3.h
  81. 2 15
      Source/Urho3D/Math/Vector4.h
  82. 1 3
      Source/Urho3D/Navigation/NavArea.cpp
  83. 1 3
      Source/Urho3D/Navigation/Navigable.cpp
  84. 1 3
      Source/Urho3D/Navigation/OffMeshConnection.cpp
  85. 1 3
      Source/Urho3D/Network/NetworkPriority.cpp
  86. 1 3
      Source/Urho3D/Resource/Image.cpp
  87. 1 3
      Source/Urho3D/Resource/JSONFile.cpp
  88. 1 3
      Source/Urho3D/Resource/Localization.cpp
  89. 1 3
      Source/Urho3D/Resource/PListFile.cpp
  90. 2 6
      Source/Urho3D/Resource/XMLElement.cpp
  91. 1 3
      Source/Urho3D/Resource/XMLFile.cpp
  92. 3 11
      Source/Urho3D/Scene/Animatable.cpp
  93. 1 3
      Source/Urho3D/Scene/Component.cpp
  94. 1 3
      Source/Urho3D/Scene/LogicComponent.cpp
  95. 1 3
      Source/Urho3D/Scene/ObjectAnimation.cpp
  96. 2 6
      Source/Urho3D/Scene/SceneResolver.cpp
  97. 1 3
      Source/Urho3D/Scene/Serializable.cpp
  98. 1 3
      Source/Urho3D/Scene/SmoothedTransform.cpp
  99. 1 1
      Source/Urho3D/Scene/SplinePath.h
  100. 1 3
      Source/Urho3D/Scene/ValueAnimation.cpp

+ 1 - 3
Source/Samples/18_CharacterDemo/CharacterDemo.cpp

@@ -59,9 +59,7 @@ CharacterDemo::CharacterDemo(Context* context) :
     Character::RegisterObject(context);
 }
 
-CharacterDemo::~CharacterDemo()
-{
-}
+CharacterDemo::~CharacterDemo() = default;
 
 void CharacterDemo::Start()
 {

+ 1 - 3
Source/Samples/18_CharacterDemo/Touch.cpp

@@ -39,9 +39,7 @@ Touch::Touch(Context* context, float touchSensitivity) :
 {
 }
 
-Touch::~Touch()
-{
-}
+Touch::~Touch() = default;
 
 void Touch::UpdateTouches(Controls& controls) // Called from HandleUpdate
 {

+ 1 - 3
Source/Samples/46_RaycastVehicle/Vehicle.cpp

@@ -52,9 +52,7 @@ Vehicle::Vehicle(Urho3D::Context* context)
     emittersCreated = false;
 }
 
-Vehicle::~Vehicle()
-{
-}
+Vehicle::~Vehicle() = default;
 
 void Vehicle::Init()
 {

+ 0 - 4
Source/Samples/Utilities2D/Sample2D.cpp

@@ -66,10 +66,6 @@ Sample2D::Sample2D(Context* context) :
 {
 }
 
-Sample2D::~Sample2D()
-{
-}
-
 void Sample2D::CreateCollisionShapesFromTMXObjects(Node* tileMapNode, TileMapLayer2D* tileMapLayer, TileMapInfo2D info)
 {
     // Create rigid body to the root node

+ 1 - 1
Source/Samples/Utilities2D/Sample2D.h

@@ -60,7 +60,7 @@ public:
     /// Construct.
     Sample2D(Context* context);
     /// Destruct.
-    ~Sample2D() override;
+    ~Sample2D() override = default;
 
     /// Generate physics collision shapes from the tmx file's objects located in tileMapLayer.
     void CreateCollisionShapesFromTMXObjects(Node* tileMapNode, TileMapLayer2D* tileMapLayer, TileMapInfo2D info);

+ 1 - 1
Source/Tools/SpritePacker/SpritePacker.cpp

@@ -79,7 +79,7 @@ public:
     {
     }
 
-    ~PackerInfo() override {}
+    ~PackerInfo() override = default;
 };
 
 void Help()

+ 1 - 1
Source/Urho3D/AngelScript/ScriptEventListener.h

@@ -53,7 +53,7 @@ class URHO3D_API ScriptEventListener
 {
 public:
     /// Destruct
-    virtual ~ScriptEventListener() { };
+    virtual ~ScriptEventListener() = default;
 
     /// Add a scripted event handler.
     virtual void AddEventHandler(StringHash eventType, const String& handlerName) = 0;

+ 1 - 3
Source/Urho3D/Audio/BufferedSoundStream.cpp

@@ -34,9 +34,7 @@ BufferedSoundStream::BufferedSoundStream() :
 {
 }
 
-BufferedSoundStream::~BufferedSoundStream()
-{
-}
+BufferedSoundStream::~BufferedSoundStream() = default;
 
 unsigned BufferedSoundStream::GetData(signed char* dest, unsigned numBytes)
 {

+ 1 - 3
Source/Urho3D/Audio/Sound.cpp

@@ -74,9 +74,7 @@ Sound::Sound(Context* context) :
 {
 }
 
-Sound::~Sound()
-{
-}
+Sound::~Sound() = default;
 
 void Sound::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Audio/SoundListener.cpp

@@ -35,9 +35,7 @@ SoundListener::SoundListener(Context* context) :
 {
 }
 
-SoundListener::~SoundListener()
-{
-}
+SoundListener::~SoundListener() = default;
 
 void SoundListener::RegisterObject(Context* context)
 {

+ 2 - 4
Source/Urho3D/Audio/SoundStream.cpp

@@ -35,15 +35,13 @@ SoundStream::SoundStream() :
 {
 }
 
-SoundStream::~SoundStream()
-{
-}
+SoundStream::~SoundStream() = default;
 
 bool SoundStream::Seek(unsigned int sample_number)
 {
     return false;
 }
-    
+
 void SoundStream::SetFormat(unsigned frequency, bool sixteenBit, bool stereo)
 {
     frequency_ = frequency;

+ 3 - 9
Source/Urho3D/Container/HashMap.h

@@ -84,9 +84,7 @@ public:
     struct Node : public HashNodeBase
     {
         /// Construct undefined.
-        Node()
-        {
-        }
+        Node() = default;
 
         /// Construct with key and value.
         Node(const T& key, const U& value) :
@@ -111,9 +109,7 @@ public:
     struct Iterator : public HashIteratorBase
     {
         /// Construct.
-        Iterator()
-        {
-        }
+        Iterator() = default;
 
         /// Construct with a node pointer.
         Iterator(Node* ptr) :
@@ -162,9 +158,7 @@ public:
     struct ConstIterator : public HashIteratorBase
     {
         /// Construct.
-        ConstIterator()
-        {
-        }
+        ConstIterator() = default;
 
         /// Construct with a node pointer.
         ConstIterator(Node* ptr) :

+ 3 - 9
Source/Urho3D/Container/HashSet.h

@@ -39,9 +39,7 @@ public:
     struct Node : public HashNodeBase
     {
         /// Construct undefined.
-        Node()
-        {
-        }
+        Node() = default;
 
         /// Construct with key.
         Node(const T& key) :
@@ -66,9 +64,7 @@ public:
     struct Iterator : public HashIteratorBase
     {
         /// Construct.
-        Iterator()
-        {
-        }
+        Iterator() = default;
 
         /// Construct with a node pointer.
         Iterator(Node* ptr) :
@@ -117,9 +113,7 @@ public:
     struct ConstIterator : public HashIteratorBase
     {
         /// Construct.
-        ConstIterator()
-        {
-        }
+        ConstIterator() = default;
 
         /// Construct with a node pointer.
         ConstIterator(Node* ptr) :

+ 3 - 9
Source/Urho3D/Container/List.h

@@ -36,9 +36,7 @@ public:
     struct Node : public ListNodeBase
     {
         /// Construct undefined.
-        Node()
-        {
-        }
+        Node() = default;
 
         /// Construct with value.
         Node(const T& value) :
@@ -60,9 +58,7 @@ public:
     struct Iterator : public ListIteratorBase
     {
         /// Construct.
-        Iterator()
-        {
-        }
+        Iterator() = default;
 
         /// Construct with a node pointer.
         explicit Iterator(Node* ptr) :
@@ -111,9 +107,7 @@ public:
     struct ConstIterator : public ListIteratorBase
     {
         /// Construct.
-        ConstIterator()
-        {
-        }
+        ConstIterator() = default;
 
         /// Construct with a node pointer.
         explicit ConstIterator(Node* ptr) :

+ 1 - 3
Source/Urho3D/Container/Pair.h

@@ -32,9 +32,7 @@ template <class T, class U> class Pair
 {
 public:
     /// Construct undefined.
-    Pair()
-    {
-    }
+    Pair() = default;
 
     /// Construct with values.
     Pair(const T& first, const U& second) :

+ 2 - 6
Source/Urho3D/Container/Vector.h

@@ -46,9 +46,7 @@ public:
     using ConstIterator = RandomAccessConstIterator<T>;
 
     /// Construct empty.
-    Vector()
-    {
-    }
+    Vector() = default;
 
     /// Construct with initial size.
     explicit Vector(unsigned size)
@@ -582,9 +580,7 @@ public:
     using ConstIterator = RandomAccessConstIterator<T>;
 
     /// Construct empty.
-    PODVector()
-    {
-    }
+    PODVector() = default;
 
     /// Construct with initial size.
     explicit PODVector(unsigned size)

+ 1 - 3
Source/Urho3D/Core/Object.cpp

@@ -39,9 +39,7 @@ TypeInfo::TypeInfo(const char* typeName, const TypeInfo* baseTypeInfo) :
 {
 }
 
-TypeInfo::~TypeInfo()
-{
-}
+TypeInfo::~TypeInfo() = default;
 
 bool TypeInfo::IsTypeOf(StringHash type) const
 {

+ 1 - 1
Source/Urho3D/Core/Object.h

@@ -255,7 +255,7 @@ public:
     }
 
     /// Destruct.
-    virtual ~EventHandler() { }
+    virtual ~EventHandler() = default;
 
     /// Set sender and event type.
     void SetSenderAndEventType(Object* sender, StringHash eventType)

+ 1 - 5
Source/Urho3D/Core/Spline.cpp

@@ -53,11 +53,7 @@ Spline::Spline(const Vector<Variant>& knots, InterpolationMode mode) :
 {
 }
 
-Spline::Spline(const Spline& rhs) :
-    interpolationMode_(rhs.interpolationMode_),
-    knots_(rhs.knots_)
-{
-}
+Spline::Spline(const Spline& rhs) = default;
 
 Variant Spline::GetPoint(float f) const
 {

+ 6 - 13
Source/Urho3D/Core/Variant.h

@@ -87,9 +87,7 @@ using VariantMap = HashMap<StringHash, Variant>;
 struct URHO3D_API ResourceRef
 {
     /// Construct.
-    ResourceRef()
-    {
-    }
+    ResourceRef() = default;
 
     /// Construct with type only and empty id.
     ResourceRef(StringHash type) :
@@ -119,11 +117,7 @@ struct URHO3D_API ResourceRef
     }
 
     /// Construct from another ResourceRef.
-    ResourceRef(const ResourceRef& rhs) :
-        type_(rhs.type_),
-        name_(rhs.name_)
-    {
-    }
+    ResourceRef(const ResourceRef& rhs) = default;
 
     /// Object type.
     StringHash type_;
@@ -141,9 +135,7 @@ struct URHO3D_API ResourceRef
 struct URHO3D_API ResourceRefList
 {
     /// Construct.
-    ResourceRefList()
-    {
-    }
+    ResourceRefList() = default;
 
     /// Construct with type only.
     ResourceRefList(StringHash type) :
@@ -184,7 +176,8 @@ public:
     /// Construct empty.
     CustomVariantValue() : typeInfo_(typeid(void)) { }
     /// Destruct.
-    virtual ~CustomVariantValue() { }
+    virtual ~CustomVariantValue() = default;
+
     /// Get the type info.
     const std::type_info& GetTypeInfo() const { return typeInfo_; }
     /// Return whether the specified type is stored.
@@ -330,7 +323,7 @@ class URHO3D_API Variant
 {
 public:
     /// Construct empty.
-    Variant() { }
+    Variant() = default;
 
     /// Construct from integer.
     Variant(int value)

+ 1 - 3
Source/Urho3D/Engine/Engine.cpp

@@ -158,9 +158,7 @@ Engine::Engine(Context* context) :
     SubscribeToEvent(E_EXITREQUESTED, URHO3D_HANDLER(Engine, HandleExitRequested));
 }
 
-Engine::~Engine()
-{
-}
+Engine::~Engine() = default;
 
 bool Engine::Initialize(const VariantMap& parameters)
 {

+ 1 - 3
Source/Urho3D/Graphics/Animation.cpp

@@ -112,9 +112,7 @@ Animation::Animation(Context* context) :
 {
 }
 
-Animation::~Animation()
-{
-}
+Animation::~Animation() = default;
 
 void Animation::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Graphics/AnimationController.cpp

@@ -58,9 +58,7 @@ AnimationController::AnimationController(Context* context) :
 {
 }
 
-AnimationController::~AnimationController()
-{
-}
+AnimationController::~AnimationController() = default;
 
 void AnimationController::RegisterObject(Context* context)
 {

+ 5 - 9
Source/Urho3D/Graphics/AnimationState.cpp

@@ -41,9 +41,7 @@ AnimationStateTrack::AnimationStateTrack() :
 {
 }
 
-AnimationStateTrack::~AnimationStateTrack()
-{
-}
+AnimationStateTrack::~AnimationStateTrack() = default;
 
 AnimationState::AnimationState(AnimatedModel* model, Animation* animation) :
     model_(model),
@@ -102,9 +100,7 @@ AnimationState::AnimationState(Node* node, Animation* animation) :
 }
 
 
-AnimationState::~AnimationState()
-{
-}
+AnimationState::~AnimationState() = default;
 
 void AnimationState::SetStartBone(Bone* startBone)
 {
@@ -466,7 +462,7 @@ void AnimationState::ApplyToModel()
         // Do not apply if zero effective weight or the bone has animation disabled
         if (Equals(finalWeight, 0.0f) || !stateTrack.bone_->animated_)
             continue;
-            
+
         ApplyTrack(stateTrack, finalWeight, true);
     }
 }
@@ -534,7 +530,7 @@ void AnimationState::ApplyTrack(AnimationStateTrack& stateTrack, float weight, b
         if (channelMask & CHANNEL_SCALE)
             newScale = keyFrame->scale_;
     }
-    
+
     if (blendingMode_ == ABM_ADDITIVE) // not ABM_LERP
     {
         if (channelMask & CHANNEL_POSITION)
@@ -567,7 +563,7 @@ void AnimationState::ApplyTrack(AnimationStateTrack& stateTrack, float weight, b
                 newScale = node->GetScale().Lerp(newScale, weight);
         }
     }
-    
+
     if (silent)
     {
         if (channelMask & CHANNEL_POSITION)

+ 3 - 9
Source/Urho3D/Graphics/Batch.h

@@ -116,9 +116,7 @@ struct Batch
 struct InstanceData
 {
     /// Construct undefined.
-    InstanceData()
-    {
-    }
+    InstanceData() = default;
 
     /// Construct with transform, instancing data and distance.
     InstanceData(const Matrix3x4* worldTransform, const void* instancingData, float distance) :
@@ -153,9 +151,7 @@ struct BatchGroup : public Batch
     }
 
     /// Destruct.
-    ~BatchGroup()
-    {
-    }
+    ~BatchGroup() = default;
 
     /// Add world transform(s) from a batch.
     void AddTransforms(const Batch& batch)
@@ -186,9 +182,7 @@ struct BatchGroup : public Batch
 struct BatchGroupKey
 {
     /// Construct undefined.
-    BatchGroupKey()
-    {
-    }
+    BatchGroupKey() = default;
 
     /// Construct from a batch.
     BatchGroupKey(const Batch& batch) :

+ 1 - 3
Source/Urho3D/Graphics/BillboardSet.cpp

@@ -105,9 +105,7 @@ BillboardSet::BillboardSet(Context* context) :
     batches_[0].worldTransform_ = &transforms_[0];
 }
 
-BillboardSet::~BillboardSet()
-{
-}
+BillboardSet::~BillboardSet() = default;
 
 void BillboardSet::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Graphics/Camera.cpp

@@ -78,9 +78,7 @@ Camera::Camera(Context* context) :
     reflectionMatrix_ = reflectionPlane_.ReflectionMatrix();
 }
 
-Camera::~Camera()
-{
-}
+Camera::~Camera() = default;
 
 void Camera::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Graphics/CustomGeometry.cpp

@@ -56,9 +56,7 @@ CustomGeometry::CustomGeometry(Context* context) :
     SetNumGeometries(1);
 }
 
-CustomGeometry::~CustomGeometry()
-{
-}
+CustomGeometry::~CustomGeometry() = default;
 
 void CustomGeometry::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Graphics/DebugRenderer.cpp

@@ -56,9 +56,7 @@ DebugRenderer::DebugRenderer(Context* context) :
     SubscribeToEvent(E_ENDFRAME, URHO3D_HANDLER(DebugRenderer, HandleEndFrame));
 }
 
-DebugRenderer::~DebugRenderer()
-{
-}
+DebugRenderer::~DebugRenderer() = default;
 
 void DebugRenderer::RegisterObject(Context* context)
 {

+ 2 - 6
Source/Urho3D/Graphics/DebugRenderer.h

@@ -44,9 +44,7 @@ class VertexBuffer;
 struct DebugLine
 {
     /// Construct undefined.
-    DebugLine()
-    {
-    }
+    DebugLine() = default;
 
     /// Construct with start and end positions and color.
     DebugLine(const Vector3& start, const Vector3& end, unsigned color) :
@@ -68,9 +66,7 @@ struct DebugLine
 struct DebugTriangle
 {
     /// Construct undefined.
-    DebugTriangle()
-    {
-    }
+    DebugTriangle() = default;
 
     /// Construct with start and end positions and color.
     DebugTriangle(const Vector3& v1, const Vector3& v2, const Vector3& v3, unsigned color) :

+ 1 - 3
Source/Urho3D/Graphics/DecalSet.cpp

@@ -175,9 +175,7 @@ DecalSet::DecalSet(Context* context) :
     batches_[0].geometryType_ = GEOM_STATIC_NOINSTANCING;
 }
 
-DecalSet::~DecalSet()
-{
-}
+DecalSet::~DecalSet() = default;
 
 void DecalSet::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Graphics/DecalSet.h

@@ -37,9 +37,7 @@ class VertexBuffer;
 struct DecalVertex
 {
     /// Construct with defaults.
-    DecalVertex()
-    {
-    }
+    DecalVertex() = default;
 
     /// Construct with position and normal.
     DecalVertex(const Vector3& position, const Vector3& normal) :

+ 2 - 15
Source/Urho3D/Graphics/Drawable.cpp

@@ -62,22 +62,9 @@ SourceBatch::SourceBatch(const SourceBatch& batch)
     *this = batch;
 }
 
-SourceBatch::~SourceBatch()
-{
-}
+SourceBatch::~SourceBatch() = default;
 
-SourceBatch& SourceBatch::operator =(const SourceBatch& rhs)
-{
-    distance_ = rhs.distance_;
-    geometry_ = rhs.geometry_;
-    material_ = rhs.material_;
-    worldTransform_ = rhs.worldTransform_;
-    numWorldTransforms_ = rhs.numWorldTransforms_;
-    instancingData_ = rhs.instancingData_;
-    geometryType_ = rhs.geometryType_;
-
-    return *this;
-}
+SourceBatch& SourceBatch::operator =(const SourceBatch& rhs)= default;
 
 
 Drawable::Drawable(Context* context, unsigned char drawableFlags) :

+ 3 - 5
Source/Urho3D/Graphics/Geometry.cpp

@@ -48,9 +48,7 @@ Geometry::Geometry(Context* context) :
     SetNumVertexBuffers(1);
 }
 
-Geometry::~Geometry()
-{
-}
+Geometry::~Geometry() = default;
 
 bool Geometry::SetNumVertexBuffers(unsigned num)
 {
@@ -310,12 +308,12 @@ float Geometry::GetHitDistance(const Ray& ray, Vector3* outNormal, Vector2* outU
     const PODVector<VertexElement>* elements;
 
     GetRawData(vertexData, vertexSize, indexData, indexSize, elements);
-    
+
     if (!vertexData || !elements || VertexBuffer::GetElementOffset(*elements, TYPE_VECTOR3, SEM_POSITION) != 0)
         return M_INFINITY;
 
     unsigned uvOffset = VertexBuffer::GetElementOffset(*elements, TYPE_VECTOR2, SEM_TEXCOORD);
-    
+
     if (outUV && uvOffset == M_MAX_UNSIGNED)
     {
         // requested UV output, but no texture data in vertex buffer

+ 1 - 3
Source/Urho3D/Graphics/Light.cpp

@@ -115,9 +115,7 @@ Light::Light(Context* context) :
 {
 }
 
-Light::~Light()
-{
-}
+Light::~Light() = default;
 
 void Light::RegisterObject(Context* context)
 {

+ 3 - 9
Source/Urho3D/Graphics/Light.h

@@ -54,9 +54,7 @@ static const unsigned MAX_CASCADE_SPLITS = 1;
 struct URHO3D_API BiasParameters
 {
     /// Construct undefined.
-    BiasParameters()
-    {
-    }
+    BiasParameters() = default;
 
     /// Construct with initial values.
     BiasParameters(float constantBias, float slopeScaledBias, float normalOffset = 0.0f) :
@@ -81,9 +79,7 @@ struct URHO3D_API BiasParameters
 struct URHO3D_API CascadeParameters
 {
     /// Construct undefined.
-    CascadeParameters()
-    {
-    }
+    CascadeParameters() = default;
 
     /// Construct with initial values.
     CascadeParameters(float split1, float split2, float split3, float split4, float fadeStart, float biasAutoAdjust = 1.0f) :
@@ -121,9 +117,7 @@ struct URHO3D_API CascadeParameters
 struct URHO3D_API FocusParameters
 {
     /// Construct undefined.
-    FocusParameters()
-    {
-    }
+    FocusParameters() = default;
 
     /// Construct with initial values.
     FocusParameters(bool focus, bool nonUniform, bool autoSize, float quantize, float minView) :

+ 4 - 14
Source/Urho3D/Graphics/Material.cpp

@@ -179,9 +179,7 @@ TechniqueEntry::TechniqueEntry(Technique* tech, unsigned qualityLevel, float lod
 {
 }
 
-TechniqueEntry::~TechniqueEntry()
-{
-}
+TechniqueEntry::~TechniqueEntry() = default;
 
 ShaderParameterAnimationInfo::ShaderParameterAnimationInfo(Material* target, const String& name, ValueAnimation* attributeAnimation,
     WrapMode wrapMode, float speed) :
@@ -190,15 +188,9 @@ ShaderParameterAnimationInfo::ShaderParameterAnimationInfo(Material* target, con
 {
 }
 
-ShaderParameterAnimationInfo::ShaderParameterAnimationInfo(const ShaderParameterAnimationInfo& other) :
-    ValueAnimationInfo(other),
-    name_(other.name_)
-{
-}
+ShaderParameterAnimationInfo::ShaderParameterAnimationInfo(const ShaderParameterAnimationInfo& other) = default;
 
-ShaderParameterAnimationInfo::~ShaderParameterAnimationInfo()
-{
-}
+ShaderParameterAnimationInfo::~ShaderParameterAnimationInfo() = default;
 
 void ShaderParameterAnimationInfo::ApplyValue(const Variant& newValue)
 {
@@ -219,9 +211,7 @@ Material::Material(Context* context) :
     ResetToDefaults();
 }
 
-Material::~Material()
-{
-}
+Material::~Material() = default;
 
 void Material::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Graphics/Model.cpp

@@ -65,9 +65,7 @@ Model::Model(Context* context) :
 {
 }
 
-Model::~Model()
-{
-}
+Model::~Model() = default;
 
 void Model::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Graphics/OcclusionBuffer.cpp

@@ -61,9 +61,7 @@ OcclusionBuffer::OcclusionBuffer(Context* context) :
 {
 }
 
-OcclusionBuffer::~OcclusionBuffer()
-{
-}
+OcclusionBuffer::~OcclusionBuffer() = default;
 
 bool OcclusionBuffer::SetSize(int width, int height, bool threaded)
 {

+ 1 - 3
Source/Urho3D/Graphics/OctreeQuery.h

@@ -47,9 +47,7 @@ public:
     }
 
     /// Destruct.
-    virtual ~OctreeQuery()
-    {
-    }
+    virtual ~OctreeQuery() = default;
 
     /// Intersection test for an octant.
     virtual Intersection TestOctant(const BoundingBox& box, bool inside) = 0;

+ 1 - 3
Source/Urho3D/Graphics/ParticleEffect.cpp

@@ -88,9 +88,7 @@ ParticleEffect::ParticleEffect(Context* context) :
 {
 }
 
-ParticleEffect::~ParticleEffect()
-{
-}
+ParticleEffect::~ParticleEffect() = default;
 
 void ParticleEffect::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Graphics/ParticleEmitter.cpp

@@ -58,9 +58,7 @@ ParticleEmitter::ParticleEmitter(Context* context) :
     SetNumParticles(DEFAULT_NUM_PARTICLES);
 }
 
-ParticleEmitter::~ParticleEmitter()
-{
-}
+ParticleEmitter::~ParticleEmitter() = default;
 
 void ParticleEmitter::RegisterObject(Context* context)
 {

+ 2 - 6
Source/Urho3D/Graphics/RenderPath.cpp

@@ -306,13 +306,9 @@ CubeMapFace RenderPathCommand::GetOutputFace(unsigned index) const
     return index < outputs_.Size() ? outputs_[index].second_ : FACE_POSITIVE_X;
 }
 
-RenderPath::RenderPath()
-{
-}
+RenderPath::RenderPath() = default;
 
-RenderPath::~RenderPath()
-{
-}
+RenderPath::~RenderPath() = default;
 
 SharedPtr<RenderPath> RenderPath::Clone()
 {

+ 1 - 3
Source/Urho3D/Graphics/Renderer.cpp

@@ -308,9 +308,7 @@ Renderer::Renderer(Context* context) :
     Initialize();
 }
 
-Renderer::~Renderer()
-{
-}
+Renderer::~Renderer() = default;
 
 void Renderer::SetNumViewports(unsigned num)
 {

+ 1 - 3
Source/Urho3D/Graphics/RibbonTrail.cpp

@@ -92,9 +92,7 @@ RibbonTrail::RibbonTrail(Context* context) :
     batches_[0].numWorldTransforms_ = 1;
 }
 
-RibbonTrail::~RibbonTrail()
-{
-}
+RibbonTrail::~RibbonTrail() = default;
 
 void RibbonTrail::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Graphics/Skeleton.cpp

@@ -35,9 +35,7 @@ Skeleton::Skeleton() :
 {
 }
 
-Skeleton::~Skeleton()
-{
-}
+Skeleton::~Skeleton() = default;
 
 bool Skeleton::Load(Deserializer& source)
 {

+ 1 - 3
Source/Urho3D/Graphics/Skybox.cpp

@@ -41,9 +41,7 @@ Skybox::Skybox(Context* context) :
 {
 }
 
-Skybox::~Skybox()
-{
-}
+Skybox::~Skybox() = default;
 
 void Skybox::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Graphics/StaticModel.cpp

@@ -51,9 +51,7 @@ StaticModel::StaticModel(Context* context) :
 {
 }
 
-StaticModel::~StaticModel()
-{
-}
+StaticModel::~StaticModel() = default;
 
 void StaticModel::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Graphics/StaticModelGroup.cpp

@@ -55,9 +55,7 @@ StaticModelGroup::StaticModelGroup(Context* context) :
     UpdateNodeIDs();
 }
 
-StaticModelGroup::~StaticModelGroup()
-{
-}
+StaticModelGroup::~StaticModelGroup() = default;
 
 void StaticModelGroup::RegisterObject(Context* context)
 {

+ 2 - 6
Source/Urho3D/Graphics/Technique.cpp

@@ -94,9 +94,7 @@ Pass::Pass(const String& name) :
         lightingMode_ = LIGHTING_PERPIXEL;
 }
 
-Pass::~Pass()
-{
-}
+Pass::~Pass() = default;
 
 void Pass::SetBlendMode(BlendMode mode)
 {
@@ -250,9 +248,7 @@ Technique::Technique(Context* context) :
 #endif
 }
 
-Technique::~Technique()
-{
-}
+Technique::~Technique() = default;
 
 void Technique::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Graphics/Terrain.cpp

@@ -115,9 +115,7 @@ Terrain::Terrain(Context* context) :
     indexBuffer_->SetShadowed(true);
 }
 
-Terrain::~Terrain()
-{
-}
+Terrain::~Terrain() = default;
 
 void Terrain::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Graphics/TerrainPatch.cpp

@@ -63,9 +63,7 @@ TerrainPatch::TerrainPatch(Context* context) :
     batches_[0].geometryType_ = GEOM_STATIC_NOINSTANCING;
 }
 
-TerrainPatch::~TerrainPatch()
-{
-}
+TerrainPatch::~TerrainPatch() = default;
 
 void TerrainPatch::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Graphics/Texture.cpp

@@ -84,9 +84,7 @@ Texture::Texture(Context* context) :
         mipsToSkip_[i] = (unsigned)(MAX_TEXTURE_QUALITY_LEVELS - 1 - i);
 }
 
-Texture::~Texture()
-{
-}
+Texture::~Texture() = default;
 
 void Texture::SetNumLevels(unsigned levels)
 {

+ 1 - 3
Source/Urho3D/Graphics/View.cpp

@@ -311,9 +311,7 @@ View::View(Context* context) :
     frame_.camera_ = nullptr;
 }
 
-View::~View()
-{
-}
+View::~View() = default;
 
 bool View::Define(RenderSurface* renderTarget, Viewport* viewport)
 {

+ 1 - 3
Source/Urho3D/Graphics/Viewport.cpp

@@ -64,9 +64,7 @@ Viewport::Viewport(Context* context, Scene* scene, Camera* camera, const IntRect
     SetRenderPath(renderPath);
 }
 
-Viewport::~Viewport()
-{
-}
+Viewport::~Viewport() = default;
 
 void Viewport::SetScene(Scene* scene)
 {

+ 1 - 3
Source/Urho3D/Graphics/Zone.cpp

@@ -64,9 +64,7 @@ Zone::Zone(Context* context) :
     boundingBox_ = BoundingBox(DEFAULT_BOUNDING_BOX_MIN, DEFAULT_BOUNDING_BOX_MAX);
 }
 
-Zone::~Zone()
-{
-}
+Zone::~Zone() = default;
 
 void Zone::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/IK/IKConstraint.cpp

@@ -44,9 +44,7 @@ IKConstraint::IKConstraint(Context* context) :
 }
 
 // ----------------------------------------------------------------------------
-IKConstraint::~IKConstraint()
-{
-}
+IKConstraint::~IKConstraint() = default;
 
 // ----------------------------------------------------------------------------
 void IKConstraint::RegisterObject(Context* context)

+ 1 - 1
Source/Urho3D/IO/AbstractFile.h

@@ -37,7 +37,7 @@ public:
     /// Construct.
     AbstractFile(unsigned int size) : Deserializer(size) { }
     /// Destruct.
-    ~AbstractFile() override { }
+    ~AbstractFile() override = default;
 };
 
 };

+ 1 - 3
Source/Urho3D/IO/Deserializer.cpp

@@ -43,9 +43,7 @@ Deserializer::Deserializer(unsigned size) :
 {
 }
 
-Deserializer::~Deserializer()
-{
-}
+Deserializer::~Deserializer() = default;
 
 unsigned Deserializer::SeekRelative(int delta)
 {

+ 1 - 3
Source/Urho3D/IO/Log.h

@@ -51,9 +51,7 @@ class File;
 struct StoredLogMessage
 {
     /// Construct undefined.
-    StoredLogMessage()
-    {
-    }
+    StoredLogMessage() = default;
 
     /// Construct with parameters.
     StoredLogMessage(const String& message, int level, bool error) :

+ 1 - 3
Source/Urho3D/IO/PackageFile.cpp

@@ -48,9 +48,7 @@ PackageFile::PackageFile(Context* context, const String& fileName, unsigned star
     Open(fileName, startOffset);
 }
 
-PackageFile::~PackageFile()
-{
-}
+PackageFile::~PackageFile() = default;
 
 bool PackageFile::Open(const String& fileName, unsigned startOffset)
 {

+ 1 - 3
Source/Urho3D/IO/Serializer.cpp

@@ -31,9 +31,7 @@ namespace Urho3D
 
 static const float q = 32767.0f;
 
-Serializer::~Serializer()
-{
-}
+Serializer::~Serializer() = default;
 
 bool Serializer::WriteInt64(long long value)
 {

+ 1 - 3
Source/Urho3D/IO/VectorBuffer.cpp

@@ -27,9 +27,7 @@
 namespace Urho3D
 {
 
-VectorBuffer::VectorBuffer()
-{
-}
+VectorBuffer::VectorBuffer() = default;
 
 VectorBuffer::VectorBuffer(const PODVector<unsigned char>& data)
 {

+ 1 - 3
Source/Urho3D/Input/Controls.cpp

@@ -34,9 +34,7 @@ Controls::Controls() :
 {
 }
 
-Controls::~Controls()
-{
-}
+Controls::~Controls() = default;
 
 void Controls::Reset()
 {

+ 1 - 3
Source/Urho3D/LuaScript/LuaFile.cpp

@@ -49,9 +49,7 @@ LuaFile::LuaFile(Context* context) :
 {
 }
 
-LuaFile::~LuaFile()
-{
-}
+LuaFile::~LuaFile() = default;
 
 void LuaFile::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/LuaScript/LuaScriptEventInvoker.cpp

@@ -42,9 +42,7 @@ LuaScriptEventInvoker::LuaScriptEventInvoker(LuaScriptInstance* instance) :
 {
 }
 
-LuaScriptEventInvoker::~LuaScriptEventInvoker()
-{
-}
+LuaScriptEventInvoker::~LuaScriptEventInvoker() = default;
 
 void LuaScriptEventInvoker::AddEventHandler(Object* sender, const StringHash& eventType, LuaFunction* function)
 {

+ 1 - 1
Source/Urho3D/LuaScript/LuaScriptEventListener.h

@@ -32,7 +32,7 @@ class URHO3D_API LuaScriptEventListener
 {
 public:
     /// Destruct.
-    virtual ~LuaScriptEventListener() { };
+    virtual ~LuaScriptEventListener() = default;;
 
     /// Add a scripted event handler by function at the given stack index.
     virtual void AddEventHandler(const String& eventName, int index) = 0;

+ 2 - 15
Source/Urho3D/Math/Color.h

@@ -46,13 +46,7 @@ public:
     }
 
     /// Copy-construct from another color.
-    Color(const Color& color) :
-        r_(color.r_),
-        g_(color.g_),
-        b_(color.b_),
-        a_(color.a_)
-    {
-    }
+    Color(const Color& color) = default;
 
     /// Construct from another color and modify the alpha.
     Color(const Color& color, float a) :
@@ -91,14 +85,7 @@ public:
     }
 
     /// Assign from another color.
-    Color& operator =(const Color& rhs)
-    {
-        r_ = rhs.r_;
-        g_ = rhs.g_;
-        b_ = rhs.b_;
-        a_ = rhs.a_;
-        return *this;
-    }
+    Color& operator =(const Color& rhs) = default;
 
     /// Test for equality with another color without epsilon.
     bool operator ==(const Color& rhs) const { return r_ == rhs.r_ && g_ == rhs.g_ && b_ == rhs.b_ && a_ == rhs.a_; }

+ 1 - 3
Source/Urho3D/Math/Frustum.cpp

@@ -57,9 +57,7 @@ void ProjectAndMergeEdge(Vector3 v0, Vector3 v1, Rect& rect, const Matrix4& proj
     rect.Merge(Vector2(tV1.x_, tV1.y_));
 }
 
-Frustum::Frustum()
-{
-}
+Frustum::Frustum() = default;
 
 Frustum::Frustum(const Frustum& frustum)
 {

+ 2 - 15
Source/Urho3D/Math/Matrix2.h

@@ -41,13 +41,7 @@ public:
     }
 
     /// Copy-construct from another matrix.
-    Matrix2(const Matrix2& matrix) :
-        m00_(matrix.m00_),
-        m01_(matrix.m01_),
-        m10_(matrix.m10_),
-        m11_(matrix.m11_)
-    {
-    }
+    Matrix2(const Matrix2& matrix) = default;
 
     /// Construct from values.
     Matrix2(float v00, float v01,
@@ -69,14 +63,7 @@ public:
     }
 
     /// Assign from another matrix.
-    Matrix2& operator =(const Matrix2& rhs)
-    {
-        m00_ = rhs.m00_;
-        m01_ = rhs.m01_;
-        m10_ = rhs.m10_;
-        m11_ = rhs.m11_;
-        return *this;
-    }
+    Matrix2& operator =(const Matrix2& rhs) = default;
 
     /// Test for equality with another matrix without epsilon.
     bool operator ==(const Matrix2& rhs) const

+ 2 - 25
Source/Urho3D/Math/Matrix3.h

@@ -46,18 +46,7 @@ public:
     }
 
     /// Copy-construct from another matrix.
-    Matrix3(const Matrix3& matrix) :
-        m00_(matrix.m00_),
-        m01_(matrix.m01_),
-        m02_(matrix.m02_),
-        m10_(matrix.m10_),
-        m11_(matrix.m11_),
-        m12_(matrix.m12_),
-        m20_(matrix.m20_),
-        m21_(matrix.m21_),
-        m22_(matrix.m22_)
-    {
-    }
+    Matrix3(const Matrix3& matrix) = default;
 
     /// Construct from values.
     Matrix3(float v00, float v01, float v02,
@@ -90,19 +79,7 @@ public:
     }
 
     /// Assign from another matrix.
-    Matrix3& operator =(const Matrix3& rhs)
-    {
-        m00_ = rhs.m00_;
-        m01_ = rhs.m01_;
-        m02_ = rhs.m02_;
-        m10_ = rhs.m10_;
-        m11_ = rhs.m11_;
-        m12_ = rhs.m12_;
-        m20_ = rhs.m20_;
-        m21_ = rhs.m21_;
-        m22_ = rhs.m22_;
-        return *this;
-    }
+    Matrix3& operator =(const Matrix3& rhs) = default;
 
     /// Test for equality with another matrix without epsilon.
     bool operator ==(const Matrix3& rhs) const

+ 2 - 13
Source/Urho3D/Math/Plane.h

@@ -38,12 +38,7 @@ public:
     }
 
     /// Copy-construct from another plane.
-    Plane(const Plane& plane) :
-        normal_(plane.normal_),
-        absNormal_(plane.absNormal_),
-        d_(plane.d_)
-    {
-    }
+    Plane(const Plane& plane) = default;
 
     /// Construct from 3 vertices.
     Plane(const Vector3& v0, const Vector3& v1, const Vector3& v2)
@@ -64,13 +59,7 @@ public:
     }
 
     /// Assign from another plane.
-    Plane& operator =(const Plane& rhs)
-    {
-        normal_ = rhs.normal_;
-        absNormal_ = rhs.absNormal_;
-        d_ = rhs.d_;
-        return *this;
-    }
+    Plane& operator =(const Plane& rhs) = default;
 
     /// Define from 3 vertices.
     void Define(const Vector3& v0, const Vector3& v1, const Vector3& v2)

+ 1 - 3
Source/Urho3D/Math/Polyhedron.cpp

@@ -34,9 +34,7 @@
 namespace Urho3D
 {
 
-Polyhedron::~Polyhedron()
-{
-}
+Polyhedron::~Polyhedron() = default;
 
 void Polyhedron::Define(const BoundingBox& box)
 {

+ 1 - 3
Source/Urho3D/Math/Polyhedron.h

@@ -38,9 +38,7 @@ class URHO3D_API Polyhedron
 {
 public:
     /// Construct empty.
-    Polyhedron()
-    {
-    }
+    Polyhedron() = default;
 
     /// Copy-construct from another polyhedron.
     Polyhedron(const Polyhedron& polyhedron) :

+ 3 - 14
Source/Urho3D/Math/Ray.h

@@ -38,9 +38,7 @@ class URHO3D_API Ray
 {
 public:
     /// Construct a degenerate ray with zero origin and direction.
-    Ray()
-    {
-    }
+    Ray() = default;
 
     /// Construct from origin and direction. The direction will be normalized.
     Ray(const Vector3& origin, const Vector3& direction)
@@ -49,19 +47,10 @@ public:
     }
 
     /// Copy-construct from another ray.
-    Ray(const Ray& ray) :
-        origin_(ray.origin_),
-        direction_(ray.direction_)
-    {
-    }
+    Ray(const Ray& ray) = default;
 
     /// Assign from another ray.
-    Ray& operator =(const Ray& rhs)
-    {
-        origin_ = rhs.origin_;
-        direction_ = rhs.direction_;
-        return *this;
-    }
+    Ray& operator =(const Ray& rhs) = default;
 
     /// Check for equality with another ray.
     bool operator ==(const Ray& rhs) const { return origin_ == rhs.origin_ && direction_ == rhs.direction_; }

+ 2 - 11
Source/Urho3D/Math/Rect.h

@@ -67,19 +67,10 @@ public:
     }
 
     /// Copy-construct from another rect.
-    Rect(const Rect& rect) :
-        min_(rect.min_),
-        max_(rect.max_)
-    {
-    }
+    Rect(const Rect& rect) = default;
 
     /// Assign from another rect.
-    Rect& operator =(const Rect& rhs)
-    {
-        min_ = rhs.min_;
-        max_ = rhs.max_;
-        return *this;
-    }
+    Rect& operator =(const Rect& rhs) = default;
 
     /// Test for equality with another rect.
     bool operator ==(const Rect& rhs) const { return min_ == rhs.min_ && max_ == rhs.max_; }

+ 2 - 11
Source/Urho3D/Math/Sphere.h

@@ -43,11 +43,7 @@ public:
     }
 
     /// Copy-construct from another sphere.
-    Sphere(const Sphere& sphere) :
-        center_(sphere.center_),
-        radius_(sphere.radius_)
-    {
-    }
+    Sphere(const Sphere& sphere) = default;
 
     /// Construct from center and radius.
     Sphere(const Vector3& center, float radius) :
@@ -81,12 +77,7 @@ public:
     }
 
     /// Assign from another sphere.
-    Sphere& operator =(const Sphere& rhs)
-    {
-        center_ = rhs.center_;
-        radius_ = rhs.radius_;
-        return *this;
-    }
+    Sphere& operator =(const Sphere& rhs) = default;
 
     /// Test for equality with another sphere.
     bool operator ==(const Sphere& rhs) const { return center_ == rhs.center_ && radius_ == rhs.radius_; }

+ 2 - 9
Source/Urho3D/Math/StringHash.h

@@ -38,10 +38,7 @@ public:
     }
 
     /// Copy-construct from another hash.
-    StringHash(const StringHash& rhs) :
-        value_(rhs.value_)
-    {
-    }
+    StringHash(const StringHash& rhs) = default;
 
     /// Construct with an initial value.
     explicit StringHash(unsigned value) :
@@ -55,11 +52,7 @@ public:
     StringHash(const String& str);
 
     /// Assign from another hash.
-    StringHash& operator =(const StringHash& rhs)
-    {
-        value_ = rhs.value_;
-        return *this;
-    }
+    StringHash& operator =(const StringHash& rhs) = default;
 
     /// Add a hash.
     StringHash operator +(const StringHash& rhs) const

+ 4 - 22
Source/Urho3D/Math/Vector2.h

@@ -60,19 +60,10 @@ public:
     {
     }
     /// Copy-construct from another vector.
-    IntVector2(const IntVector2& rhs) :
-        x_(rhs.x_),
-        y_(rhs.y_)
-    {
-    }
+    IntVector2(const IntVector2& rhs) = default;
 
     /// Assign from another vector.
-    IntVector2& operator =(const IntVector2& rhs)
-    {
-        x_ = rhs.x_;
-        y_ = rhs.y_;
-        return *this;
-    }
+    IntVector2& operator =(const IntVector2& rhs) = default;
 
     /// Test for equality with another vector.
     bool operator ==(const IntVector2& rhs) const { return x_ == rhs.x_ && y_ == rhs.y_; }
@@ -192,11 +183,7 @@ public:
     }
 
     /// Copy-construct from another vector.
-    Vector2(const Vector2& vector) :
-        x_(vector.x_),
-        y_(vector.y_)
-    {
-    }
+    Vector2(const Vector2& vector) = default;
 
     /// Construct from an IntVector2.
     explicit Vector2(const IntVector2& vector) :
@@ -220,12 +207,7 @@ public:
     }
 
     /// Assign from another vector.
-    Vector2& operator =(const Vector2& rhs)
-    {
-        x_ = rhs.x_;
-        y_ = rhs.y_;
-        return *this;
-    }
+    Vector2& operator =(const Vector2& rhs) = default;
 
     /// Test for equality with another vector without epsilon.
     bool operator ==(const Vector2& rhs) const { return x_ == rhs.x_ && y_ == rhs.y_; }

+ 4 - 26
Source/Urho3D/Math/Vector3.h

@@ -57,21 +57,10 @@ public:
     }
 
     /// Copy-construct from another vector.
-    IntVector3(const IntVector3& rhs) :
-        x_(rhs.x_),
-        y_(rhs.y_),
-        z_(rhs.z_)
-    {
-    }
+    IntVector3(const IntVector3& rhs) = default;
 
     /// Assign from another vector.
-    IntVector3& operator =(const IntVector3& rhs)
-    {
-        x_ = rhs.x_;
-        y_ = rhs.y_;
-        z_ = rhs.z_;
-        return *this;
-    }
+    IntVector3& operator =(const IntVector3& rhs) = default;
 
     /// Test for equality with another vector.
     bool operator ==(const IntVector3& rhs) const { return x_ == rhs.x_ && y_ == rhs.y_ && z_ == rhs.z_; }
@@ -204,12 +193,7 @@ public:
     }
 
     /// Copy-construct from another vector.
-    Vector3(const Vector3& vector) :
-        x_(vector.x_),
-        y_(vector.y_),
-        z_(vector.z_)
-    {
-    }
+    Vector3(const Vector3& vector) = default;
 
     /// Construct from a two-dimensional vector and the Z coordinate.
     Vector3(const Vector2& vector, float z) :
@@ -260,13 +244,7 @@ public:
     }
 
     /// Assign from another vector.
-    Vector3& operator =(const Vector3& rhs)
-    {
-        x_ = rhs.x_;
-        y_ = rhs.y_;
-        z_ = rhs.z_;
-        return *this;
-    }
+    Vector3& operator =(const Vector3& rhs) = default;
 
     /// Test for equality with another vector without epsilon.
     bool operator ==(const Vector3& rhs) const { return x_ == rhs.x_ && y_ == rhs.y_ && z_ == rhs.z_; }

+ 2 - 15
Source/Urho3D/Math/Vector4.h

@@ -41,13 +41,7 @@ public:
     }
 
     /// Copy-construct from another vector.
-    Vector4(const Vector4& vector) :
-        x_(vector.x_),
-        y_(vector.y_),
-        z_(vector.z_),
-        w_(vector.w_)
-    {
-    }
+    Vector4(const Vector4& vector) = default;
 
     /// Construct from a 3-dimensional vector and the W coordinate.
     Vector4(const Vector3& vector, float w) :
@@ -77,14 +71,7 @@ public:
     }
 
     /// Assign from another vector.
-    Vector4& operator =(const Vector4& rhs)
-    {
-        x_ = rhs.x_;
-        y_ = rhs.y_;
-        z_ = rhs.z_;
-        w_ = rhs.w_;
-        return *this;
-    }
+    Vector4& operator =(const Vector4& rhs) = default;
 
     /// Test for equality with another vector without epsilon.
     bool operator ==(const Vector4& rhs) const { return x_ == rhs.x_ && y_ == rhs.y_ && z_ == rhs.z_ && w_ == rhs.w_; }

+ 1 - 3
Source/Urho3D/Navigation/NavArea.cpp

@@ -45,9 +45,7 @@ NavArea::NavArea(Context* context) :
 {
 }
 
-NavArea::~NavArea()
-{
-}
+NavArea::~NavArea() = default;
 
 void NavArea::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Navigation/Navigable.cpp

@@ -38,9 +38,7 @@ Navigable::Navigable(Context* context) :
 {
 }
 
-Navigable::~Navigable()
-{
-}
+Navigable::~Navigable() = default;
 
 void Navigable::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Navigation/OffMeshConnection.cpp

@@ -49,9 +49,7 @@ OffMeshConnection::OffMeshConnection(Context* context) :
 {
 }
 
-OffMeshConnection::~OffMeshConnection()
-{
-}
+OffMeshConnection::~OffMeshConnection() = default;
 
 void OffMeshConnection::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Network/NetworkPriority.cpp

@@ -46,9 +46,7 @@ NetworkPriority::NetworkPriority(Context* context) :
 {
 }
 
-NetworkPriority::~NetworkPriority()
-{
-}
+NetworkPriority::~NetworkPriority() = default;
 
 void NetworkPriority::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Resource/Image.cpp

@@ -257,9 +257,7 @@ Image::Image(Context* context) :
 {
 }
 
-Image::~Image()
-{
-}
+Image::~Image() = default;
 
 void Image::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Resource/JSONFile.cpp

@@ -47,9 +47,7 @@ JSONFile::JSONFile(Context* context) :
 {
 }
 
-JSONFile::~JSONFile()
-{
-}
+JSONFile::~JSONFile() = default;
 
 void JSONFile::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Resource/Localization.cpp

@@ -39,9 +39,7 @@ Localization::Localization(Context* context) :
 {
 }
 
-Localization::~Localization()
-{
-}
+Localization::~Localization() = default;
 
 int Localization::GetLanguageIndex(const String& language)
 {

+ 1 - 3
Source/Urho3D/Resource/PListFile.cpp

@@ -301,9 +301,7 @@ PListFile::PListFile(Context* context) :
 {
 }
 
-PListFile::~PListFile()
-{
-}
+PListFile::~PListFile() = default;
 
 void PListFile::RegisterObject(Context* context)
 {

+ 2 - 6
Source/Urho3D/Resource/XMLElement.cpp

@@ -1058,18 +1058,14 @@ bool XPathResultSet::Empty() const
     return resultSet_ ? resultSet_->empty() : true;
 }
 
-XPathQuery::XPathQuery()
-{
-}
+XPathQuery::XPathQuery() = default;
 
 XPathQuery::XPathQuery(const String& queryString, const String& variableString)
 {
     SetQuery(queryString, variableString);
 }
 
-XPathQuery::~XPathQuery()
-{
-}
+XPathQuery::~XPathQuery() = default;
 
 void XPathQuery::Bind()
 {

+ 1 - 3
Source/Urho3D/Resource/XMLFile.cpp

@@ -69,9 +69,7 @@ XMLFile::XMLFile(Context* context) :
 {
 }
 
-XMLFile::~XMLFile()
-{
-}
+XMLFile::~XMLFile() = default;
 
 void XMLFile::RegisterObject(Context* context)
 {

+ 3 - 11
Source/Urho3D/Scene/Animatable.cpp

@@ -46,15 +46,9 @@ AttributeAnimationInfo::AttributeAnimationInfo(Animatable* target, const Attribu
 {
 }
 
-AttributeAnimationInfo::AttributeAnimationInfo(const AttributeAnimationInfo& other) :
-    ValueAnimationInfo(other),
-    attributeInfo_(other.attributeInfo_)
-{
-}
+AttributeAnimationInfo::AttributeAnimationInfo(const AttributeAnimationInfo& other) = default;
 
-AttributeAnimationInfo::~AttributeAnimationInfo()
-{
-}
+AttributeAnimationInfo::~AttributeAnimationInfo() = default;
 
 void AttributeAnimationInfo::ApplyValue(const Variant& newValue)
 {
@@ -72,9 +66,7 @@ Animatable::Animatable(Context* context) :
 {
 }
 
-Animatable::~Animatable()
-{
-}
+Animatable::~Animatable() = default;
 
 void Animatable::RegisterObject(Context* context)
 {

+ 1 - 3
Source/Urho3D/Scene/Component.cpp

@@ -60,9 +60,7 @@ Component::Component(Context* context) :
 {
 }
 
-Component::~Component()
-{
-}
+Component::~Component() = default;
 
 bool Component::Save(Serializer& dest) const
 {

+ 1 - 3
Source/Urho3D/Scene/LogicComponent.cpp

@@ -41,9 +41,7 @@ LogicComponent::LogicComponent(Context* context) :
 {
 }
 
-LogicComponent::~LogicComponent()
-{
-}
+LogicComponent::~LogicComponent() = default;
 
 void LogicComponent::OnSetEnabled()
 {

+ 1 - 3
Source/Urho3D/Scene/ObjectAnimation.cpp

@@ -48,9 +48,7 @@ ObjectAnimation::ObjectAnimation(Context* context) :
 {
 }
 
-ObjectAnimation::~ObjectAnimation()
-{
-}
+ObjectAnimation::~ObjectAnimation() = default;
 
 void ObjectAnimation::RegisterObject(Context* context)
 {

+ 2 - 6
Source/Urho3D/Scene/SceneResolver.cpp

@@ -32,13 +32,9 @@
 namespace Urho3D
 {
 
-SceneResolver::SceneResolver()
-{
-}
+SceneResolver::SceneResolver() = default;
 
-SceneResolver::~SceneResolver()
-{
-}
+SceneResolver::~SceneResolver() = default;
 
 void SceneResolver::Reset()
 {

+ 1 - 3
Source/Urho3D/Scene/Serializable.cpp

@@ -59,9 +59,7 @@ Serializable::Serializable(Context* context) :
 {
 }
 
-Serializable::~Serializable()
-{
-}
+Serializable::~Serializable() = default;
 
 void Serializable::OnSetAttribute(const AttributeInfo& attr, const Variant& src)
 {

+ 1 - 3
Source/Urho3D/Scene/SmoothedTransform.cpp

@@ -41,9 +41,7 @@ SmoothedTransform::SmoothedTransform(Context* context) :
 {
 }
 
-SmoothedTransform::~SmoothedTransform()
-{
-}
+SmoothedTransform::~SmoothedTransform() = default;
 
 void SmoothedTransform::RegisterObject(Context* context)
 {

+ 1 - 1
Source/Urho3D/Scene/SplinePath.h

@@ -45,7 +45,7 @@ public:
     SplinePath(Context* context);
 
     /// Destructor.
-    ~SplinePath() override { };
+    ~SplinePath() override = default;;
     /// Register object factory.
     static void RegisterObject(Context* context);
 

+ 1 - 3
Source/Urho3D/Scene/ValueAnimation.cpp

@@ -59,9 +59,7 @@ ValueAnimation::ValueAnimation(Context* context) :
 {
 }
 
-ValueAnimation::~ValueAnimation()
-{
-}
+ValueAnimation::~ValueAnimation() = default;
 
 void ValueAnimation::RegisterObject(Context* context)
 {

Some files were not shown because too many files changed in this diff