Просмотр исходного кода

Clang-Tidy - google-explicit-constructor.

Yao Wei Tjong 姚伟忠 8 лет назад
Родитель
Сommit
d6eb307e34
100 измененных файлов с 171 добавлено и 171 удалено
  1. 1 1
      Source/Samples/01_HelloWorld/HelloWorld.h
  2. 1 1
      Source/Samples/02_HelloGUI/HelloGUI.h
  3. 1 1
      Source/Samples/03_Sprites/Sprites.h
  4. 1 1
      Source/Samples/04_StaticScene/StaticScene.h
  5. 1 1
      Source/Samples/05_AnimatingScene/AnimatingScene.h
  6. 1 1
      Source/Samples/05_AnimatingScene/Rotator.h
  7. 1 1
      Source/Samples/06_SkeletalAnimation/Mover.h
  8. 1 1
      Source/Samples/06_SkeletalAnimation/SkeletalAnimation.h
  9. 1 1
      Source/Samples/07_Billboards/Billboards.h
  10. 1 1
      Source/Samples/08_Decals/Decals.h
  11. 1 1
      Source/Samples/09_MultipleViewports/MultipleViewports.h
  12. 1 1
      Source/Samples/10_RenderToTexture/RenderToTexture.h
  13. 1 1
      Source/Samples/10_RenderToTexture/Rotator.h
  14. 1 1
      Source/Samples/11_Physics/Physics.h
  15. 1 1
      Source/Samples/12_PhysicsStressTest/PhysicsStressTest.h
  16. 1 1
      Source/Samples/13_Ragdolls/CreateRagdoll.h
  17. 1 1
      Source/Samples/13_Ragdolls/Ragdolls.h
  18. 1 1
      Source/Samples/14_SoundEffects/SoundEffects.h
  19. 1 1
      Source/Samples/15_Navigation/Navigation.h
  20. 1 1
      Source/Samples/16_Chat/Chat.h
  21. 1 1
      Source/Samples/17_SceneReplication/SceneReplication.h
  22. 1 1
      Source/Samples/18_CharacterDemo/Character.h
  23. 1 1
      Source/Samples/18_CharacterDemo/CharacterDemo.h
  24. 1 1
      Source/Samples/19_VehicleDemo/Vehicle.h
  25. 1 1
      Source/Samples/19_VehicleDemo/VehicleDemo.h
  26. 1 1
      Source/Samples/20_HugeObjectCount/HugeObjectCount.h
  27. 1 1
      Source/Samples/21_AngelScriptIntegration/AngelScriptIntegration.h
  28. 1 1
      Source/Samples/22_LuaIntegration/LuaIntegration.h
  29. 1 1
      Source/Samples/23_Water/Water.h
  30. 1 1
      Source/Samples/24_Urho2DSprite/Urho2DSprite.h
  31. 1 1
      Source/Samples/25_Urho2DParticle/Urho2DParticle.h
  32. 1 1
      Source/Samples/26_ConsoleInput/ConsoleInput.h
  33. 1 1
      Source/Samples/27_Urho2DPhysics/Urho2DPhysics.h
  34. 1 1
      Source/Samples/28_Urho2DPhysicsRope/Urho2DPhysicsRope.h
  35. 1 1
      Source/Samples/29_SoundSynthesis/SoundSynthesis.h
  36. 1 1
      Source/Samples/30_LightAnimation/LightAnimation.h
  37. 1 1
      Source/Samples/31_MaterialAnimation/MaterialAnimation.h
  38. 1 1
      Source/Samples/32_Urho2DConstraints/Urho2DConstraints.h
  39. 1 1
      Source/Samples/33_Urho2DSpriterAnimation/Urho2DSpriterAnimation.h
  40. 1 1
      Source/Samples/34_DynamicGeometry/DynamicGeometry.h
  41. 1 1
      Source/Samples/35_SignedDistanceFieldText/SignedDistanceFieldText.h
  42. 1 1
      Source/Samples/36_Urho2DTileMap/Urho2DTileMap.h
  43. 1 1
      Source/Samples/37_UIDrag/UIDrag.h
  44. 1 1
      Source/Samples/38_SceneAndUILoad/SceneAndUILoad.h
  45. 1 1
      Source/Samples/39_CrowdNavigation/CrowdNavigation.h
  46. 1 1
      Source/Samples/40_Localization/L10n.h
  47. 1 1
      Source/Samples/41_DatabaseDemo/DatabaseDemo.h
  48. 1 1
      Source/Samples/42_PBRMaterials/PBRMaterials.h
  49. 1 1
      Source/Samples/43_HttpRequestDemo/HttpRequestDemo.h
  50. 1 1
      Source/Samples/44_RibbonTrailDemo/RibbonTrailDemo.h
  51. 1 1
      Source/Samples/45_InverseKinematics/InverseKinematics.h
  52. 1 1
      Source/Samples/46_RaycastVehicle/RaycastVehicleDemo.h
  53. 1 1
      Source/Samples/46_RaycastVehicle/Vehicle.h
  54. 1 1
      Source/Samples/47_Typography/Typography.h
  55. 1 1
      Source/Samples/48_Hello3DUI/Hello3DUI.h
  56. 1 1
      Source/Samples/49_Urho2DIsometricDemo/Character2D.h
  57. 1 1
      Source/Samples/49_Urho2DIsometricDemo/Urho2DIsometricDemo.h
  58. 1 1
      Source/Samples/50_Urho2DPlatformer/Character2D.h
  59. 1 1
      Source/Samples/50_Urho2DPlatformer/Urho2DPlatformer.h
  60. 1 1
      Source/Samples/Sample.h
  61. 1 1
      Source/Samples/Utilities2D/Mover.h
  62. 1 1
      Source/Samples/Utilities2D/Sample2D.h
  63. 1 1
      Source/Tools/Urho3DPlayer/Urho3DPlayer.h
  64. 7 7
      Source/Urho3D/AngelScript/Addons.h
  65. 1 1
      Source/Urho3D/AngelScript/Script.cpp
  66. 1 1
      Source/Urho3D/AngelScript/Script.h
  67. 2 2
      Source/Urho3D/AngelScript/ScriptFile.cpp
  68. 2 2
      Source/Urho3D/AngelScript/ScriptFile.h
  69. 1 1
      Source/Urho3D/AngelScript/ScriptInstance.h
  70. 1 1
      Source/Urho3D/Audio/Audio.h
  71. 1 1
      Source/Urho3D/Audio/OggVorbisSoundStream.h
  72. 1 1
      Source/Urho3D/Audio/Sound.h
  73. 1 1
      Source/Urho3D/Audio/SoundListener.h
  74. 1 1
      Source/Urho3D/Audio/SoundSource.h
  75. 1 1
      Source/Urho3D/Audio/SoundSource3D.h
  76. 1 1
      Source/Urho3D/Container/Allocator.h
  77. 3 3
      Source/Urho3D/Container/ArrayPtr.h
  78. 3 3
      Source/Urho3D/Container/HashMap.h
  79. 4 4
      Source/Urho3D/Container/HashSet.h
  80. 2 2
      Source/Urho3D/Container/List.h
  81. 9 9
      Source/Urho3D/Container/Ptr.h
  82. 6 6
      Source/Urho3D/Container/Str.h
  83. 1 1
      Source/Urho3D/Container/VectorBase.h
  84. 1 1
      Source/Urho3D/Core/EventProfiler.h
  85. 1 1
      Source/Urho3D/Core/Mutex.h
  86. 5 5
      Source/Urho3D/Core/Object.h
  87. 1 1
      Source/Urho3D/Core/Profiler.h
  88. 2 2
      Source/Urho3D/Core/Spline.h
  89. 1 1
      Source/Urho3D/Core/Timer.h
  90. 36 36
      Source/Urho3D/Core/Variant.h
  91. 1 1
      Source/Urho3D/Core/WorkQueue.h
  92. 1 1
      Source/Urho3D/Database/Database.h
  93. 1 1
      Source/Urho3D/Engine/Application.h
  94. 1 1
      Source/Urho3D/Engine/Console.h
  95. 1 1
      Source/Urho3D/Engine/DebugHud.h
  96. 1 1
      Source/Urho3D/Engine/Engine.h
  97. 1 1
      Source/Urho3D/Graphics/AnimatedModel.h
  98. 1 1
      Source/Urho3D/Graphics/Animation.h
  99. 1 1
      Source/Urho3D/Graphics/AnimationController.h
  100. 3 3
      Source/Urho3D/Graphics/Batch.h

+ 1 - 1
Source/Samples/01_HelloWorld/HelloWorld.h

@@ -35,7 +35,7 @@ class HelloWorld : public Sample
 
 public:
     /// Construct.
-    HelloWorld(Context* context);
+    explicit HelloWorld(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/02_HelloGUI/HelloGUI.h

@@ -46,7 +46,7 @@ class HelloGUI : public Sample
 
 public:
     /// Construct.
-    HelloGUI(Context* context);
+    explicit HelloGUI(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/03_Sprites/Sprites.h

@@ -36,7 +36,7 @@ class Sprites : public Sample
 
 public:
     /// Construct.
-    Sprites(Context* context);
+    explicit Sprites(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/04_StaticScene/StaticScene.h

@@ -43,7 +43,7 @@ class StaticScene : public Sample
 
 public:
     /// Construct.
-    StaticScene(Context* context);
+    explicit StaticScene(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/05_AnimatingScene/AnimatingScene.h

@@ -43,7 +43,7 @@ class AnimatingScene : public Sample
 
 public:
     /// Construct.
-    AnimatingScene(Context* context);
+    explicit AnimatingScene(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/05_AnimatingScene/Rotator.h

@@ -34,7 +34,7 @@ class Rotator : public LogicComponent
 
 public:
     /// Construct.
-    Rotator(Context* context);
+    explicit Rotator(Context* context);
 
     /// Set rotation speed about the Euler axes. Will be scaled with scene update time step.
     void SetRotationSpeed(const Vector3& speed);

+ 1 - 1
Source/Samples/06_SkeletalAnimation/Mover.h

@@ -33,7 +33,7 @@ class Mover : public LogicComponent
 
 public:
     /// Construct.
-    Mover(Context* context);
+    explicit Mover(Context* context);
 
     /// Set motion parameters: forward movement speed, rotation speed, and movement boundaries.
     void SetParameters(float moveSpeed, float rotateSpeed, const BoundingBox& bounds);

+ 1 - 1
Source/Samples/06_SkeletalAnimation/SkeletalAnimation.h

@@ -45,7 +45,7 @@ class SkeletalAnimation : public Sample
 
 public:
     /// Construct.
-    SkeletalAnimation(Context* context);
+    explicit SkeletalAnimation(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/07_Billboards/Billboards.h

@@ -43,7 +43,7 @@ class Billboards : public Sample
 
 public:
     /// Construct.
-    Billboards(Context* context);
+    explicit Billboards(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/08_Decals/Decals.h

@@ -45,7 +45,7 @@ class Decals : public Sample
 
 public:
     /// Construct.
-    Decals(Context* context);
+    explicit Decals(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/09_MultipleViewports/MultipleViewports.h

@@ -42,7 +42,7 @@ class MultipleViewports : public Sample
 
 public:
     /// Construct.
-    MultipleViewports(Context* context);
+    explicit MultipleViewports(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/10_RenderToTexture/RenderToTexture.h

@@ -42,7 +42,7 @@ class RenderToTexture : public Sample
 
 public:
     /// Construct.
-    RenderToTexture(Context* context);
+    explicit RenderToTexture(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/10_RenderToTexture/Rotator.h

@@ -34,7 +34,7 @@ class Rotator : public LogicComponent
 
 public:
     /// Construct.
-    Rotator(Context* context);
+    explicit Rotator(Context* context);
 
     /// Set rotation speed about the Euler axes. Will be scaled with scene update time step.
     void SetRotationSpeed(const Vector3& speed);

+ 1 - 1
Source/Samples/11_Physics/Physics.h

@@ -44,7 +44,7 @@ class Physics : public Sample
 
 public:
     /// Construct.
-    Physics(Context* context);
+    explicit Physics(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/12_PhysicsStressTest/PhysicsStressTest.h

@@ -43,7 +43,7 @@ class PhysicsStressTest : public Sample
 
 public:
     /// Construct.
-    PhysicsStressTest(Context* context);
+    explicit PhysicsStressTest(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/13_Ragdolls/CreateRagdoll.h

@@ -34,7 +34,7 @@ class CreateRagdoll : public Component
 
 public:
     /// Construct.
-    CreateRagdoll(Context* context);
+    explicit CreateRagdoll(Context* context);
 
 protected:
     /// Handle node being assigned.

+ 1 - 1
Source/Samples/13_Ragdolls/Ragdolls.h

@@ -43,7 +43,7 @@ class Ragdolls : public Sample
 
 public:
     /// Construct.
-    Ragdolls(Context* context);
+    explicit Ragdolls(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/14_SoundEffects/SoundEffects.h

@@ -43,7 +43,7 @@ class SoundEffects : public Sample
 
 public:
     /// Construct.
-    SoundEffects(Context* context);
+    explicit SoundEffects(Context* context);
 
     /// Setup before engine initialization. Modifies the engine parameters.
     void Setup() override;

+ 1 - 1
Source/Samples/15_Navigation/Navigation.h

@@ -47,7 +47,7 @@ class Navigation : public Sample
 
 public:
     /// Construct.
-    Navigation(Context* context);
+    explicit Navigation(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/16_Chat/Chat.h

@@ -44,7 +44,7 @@ class Chat : public Sample
 
 public:
     /// Construct.
-    Chat(Context* context);
+    explicit Chat(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/17_SceneReplication/SceneReplication.h

@@ -47,7 +47,7 @@ class SceneReplication : public Sample
 
 public:
     /// Construct.
-    SceneReplication(Context* context);
+    explicit SceneReplication(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/18_CharacterDemo/Character.h

@@ -47,7 +47,7 @@ class Character : public LogicComponent
 
 public:
     /// Construct.
-    Character(Context* context);
+    explicit Character(Context* context);
 
     /// Register object factory and attributes.
     static void RegisterObject(Context* context);

+ 1 - 1
Source/Samples/18_CharacterDemo/CharacterDemo.h

@@ -49,7 +49,7 @@ class CharacterDemo : public Sample
 
 public:
     /// Construct.
-    CharacterDemo(Context* context);
+    explicit CharacterDemo(Context* context);
     /// Destruct.
     ~CharacterDemo() override;
 

+ 1 - 1
Source/Samples/19_VehicleDemo/Vehicle.h

@@ -53,7 +53,7 @@ class Vehicle : public LogicComponent
 
 public:
     /// Construct.
-    Vehicle(Context* context);
+    explicit Vehicle(Context* context);
 
     /// Register object factory and attributes.
     static void RegisterObject(Context* context);

+ 1 - 1
Source/Samples/19_VehicleDemo/VehicleDemo.h

@@ -45,7 +45,7 @@ class VehicleDemo : public Sample
 
 public:
     /// Construct.
-    VehicleDemo(Context* context);
+    explicit VehicleDemo(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/20_HugeObjectCount/HugeObjectCount.h

@@ -45,7 +45,7 @@ class HugeObjectCount : public Sample
 
 public:
     /// Construct.
-    HugeObjectCount(Context* context);
+    explicit HugeObjectCount(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/21_AngelScriptIntegration/AngelScriptIntegration.h

@@ -42,7 +42,7 @@ class AngelScriptIntegration : public Sample
 
 public:
     /// Construct.
-    AngelScriptIntegration(Context* context);
+    explicit AngelScriptIntegration(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/22_LuaIntegration/LuaIntegration.h

@@ -42,7 +42,7 @@ class LuaIntegration : public Sample
 
 public:
     /// Construct.
-    LuaIntegration(Context* context);
+    explicit LuaIntegration(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/23_Water/Water.h

@@ -44,7 +44,7 @@ class Water : public Sample
 
 public:
     /// Construct.
-    Water(Context* context);
+    explicit Water(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/24_Urho2DSprite/Urho2DSprite.h

@@ -41,7 +41,7 @@ class Urho2DSprite : public Sample
 
 public:
     /// Construct.
-    Urho2DSprite(Context* context);
+    explicit Urho2DSprite(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/25_Urho2DParticle/Urho2DParticle.h

@@ -41,7 +41,7 @@ class Urho2DParticle : public Sample
 
 public:
     /// Construct.
-    Urho2DParticle(Context* context);
+    explicit Urho2DParticle(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/26_ConsoleInput/ConsoleInput.h

@@ -35,7 +35,7 @@ class ConsoleInput : public Sample
 
 public:
     /// Construct.
-    ConsoleInput(Context* context);
+    explicit ConsoleInput(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/27_Urho2DPhysics/Urho2DPhysics.h

@@ -40,7 +40,7 @@ class Urho2DPhysics : public Sample
 
 public:
     /// Construct.
-    Urho2DPhysics(Context* context);
+    explicit Urho2DPhysics(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/28_Urho2DPhysicsRope/Urho2DPhysicsRope.h

@@ -42,7 +42,7 @@ class Urho2DPhysicsRope : public Sample
 
 public:
     /// Construct.
-    Urho2DPhysicsRope(Context* context);
+    explicit Urho2DPhysicsRope(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/29_SoundSynthesis/SoundSynthesis.h

@@ -41,7 +41,7 @@ class SoundSynthesis : public Sample
 
 public:
     /// Construct.
-    SoundSynthesis(Context* context);
+    explicit SoundSynthesis(Context* context);
 
     /// Setup before engine initialization. Modifies the engine parameters.
     void Setup() override;

+ 1 - 1
Source/Samples/30_LightAnimation/LightAnimation.h

@@ -41,7 +41,7 @@ class LightAnimation : public Sample
 
 public:
     /// Construct.
-    LightAnimation(Context* context);
+    explicit LightAnimation(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/31_MaterialAnimation/MaterialAnimation.h

@@ -41,7 +41,7 @@ class MaterialAnimation : public Sample
 
 public:
     /// Construct.
-    MaterialAnimation(Context* context);
+    explicit MaterialAnimation(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/32_Urho2DConstraints/Urho2DConstraints.h

@@ -56,7 +56,7 @@ class Urho2DConstraints : public Sample
 
 public:
     /// Construct.
-    Urho2DConstraints(Context* context);
+    explicit Urho2DConstraints(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/33_Urho2DSpriterAnimation/Urho2DSpriterAnimation.h

@@ -41,7 +41,7 @@ class Urho2DSpriterAnimation : public Sample
 
 public:
     /// Construct.
-    Urho2DSpriterAnimation(Context* context);
+    explicit Urho2DSpriterAnimation(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/34_DynamicGeometry/DynamicGeometry.h

@@ -43,7 +43,7 @@ class DynamicGeometry : public Sample
 
 public:
     /// Construct.
-    DynamicGeometry(Context* context);
+    explicit DynamicGeometry(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/35_SignedDistanceFieldText/SignedDistanceFieldText.h

@@ -44,7 +44,7 @@ class SignedDistanceFieldText : public Sample
 
 public:
     /// Construct.
-    SignedDistanceFieldText(Context* context);
+    explicit SignedDistanceFieldText(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/36_Urho2DTileMap/Urho2DTileMap.h

@@ -36,7 +36,7 @@ class Urho2DTileMap : public Sample
 
 public:
     /// Construct.
-    Urho2DTileMap(Context* context);
+    explicit Urho2DTileMap(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/37_UIDrag/UIDrag.h

@@ -42,7 +42,7 @@ class UIDrag : public Sample
 
 public:
     /// Construct.
-    UIDrag(Context* context);
+    explicit UIDrag(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/38_SceneAndUILoad/SceneAndUILoad.h

@@ -44,7 +44,7 @@ class SceneAndUILoad : public Sample
 
 public:
     /// Construct.
-    SceneAndUILoad(Context* context);
+    explicit SceneAndUILoad(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/39_CrowdNavigation/CrowdNavigation.h

@@ -49,7 +49,7 @@ class CrowdNavigation : public Sample
 
 public:
     /// Construct.
-    CrowdNavigation(Context* context);
+    explicit CrowdNavigation(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/40_Localization/L10n.h

@@ -35,7 +35,7 @@ class L10n : public Sample
 
 public:
     /// Construct.
-    L10n(Context* context);
+    explicit L10n(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/41_DatabaseDemo/DatabaseDemo.h

@@ -31,7 +31,7 @@ class DatabaseDemo : public Sample
 
 public:
     /// Construct.
-    DatabaseDemo(Context* context);
+    explicit DatabaseDemo(Context* context);
     /// Destruct.
     ~DatabaseDemo() override;
 

+ 1 - 1
Source/Samples/42_PBRMaterials/PBRMaterials.h

@@ -46,7 +46,7 @@ class PBRMaterials : public Sample
 
 public:
     /// Construct.
-    PBRMaterials(Context* context);
+    explicit PBRMaterials(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/43_HttpRequestDemo/HttpRequestDemo.h

@@ -39,7 +39,7 @@ class HttpRequestDemo : public Sample
 
 public:
     /// Construct.
-    HttpRequestDemo(Context* context);
+    explicit HttpRequestDemo(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/44_RibbonTrailDemo/RibbonTrailDemo.h

@@ -41,7 +41,7 @@ class RibbonTrailDemo : public Sample
 
 public:
     /// Construct.
-    RibbonTrailDemo(Context* context);
+    explicit RibbonTrailDemo(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/45_InverseKinematics/InverseKinematics.h

@@ -41,7 +41,7 @@ class InverseKinematics : public Sample
 
 public:
     /// Construct.
-    InverseKinematics(Context* context);
+    explicit InverseKinematics(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/46_RaycastVehicle/RaycastVehicleDemo.h

@@ -45,7 +45,7 @@ class RaycastVehicleDemo : public Sample
 
 public:
     /// Construct.
-    RaycastVehicleDemo(Context* context);
+    explicit RaycastVehicleDemo(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/46_RaycastVehicle/Vehicle.h

@@ -52,7 +52,7 @@ class Vehicle : public LogicComponent
 
 public :
     /// Construct.
-    Vehicle(Context* context);
+    explicit Vehicle(Context* context);
     /// Destruct.
     ~Vehicle() override;
 

+ 1 - 1
Source/Samples/47_Typography/Typography.h

@@ -32,7 +32,7 @@ class Typography : public Sample
 
 public:
     /// Construct.
-    Typography(Context* context);
+    explicit Typography(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/48_Hello3DUI/Hello3DUI.h

@@ -39,7 +39,7 @@ class Hello3DUI : public Sample
 
 public:
     /// Construct.
-    Hello3DUI(Context* context);
+    explicit Hello3DUI(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/49_Urho2DIsometricDemo/Character2D.h

@@ -37,7 +37,7 @@ class Character2D : public LogicComponent
 
 public:
     /// Construct.
-    Character2D(Context* context);
+    explicit Character2D(Context* context);
 
     /// Register object factory and attributes.
     static void RegisterObject(Context* context);

+ 1 - 1
Source/Samples/49_Urho2DIsometricDemo/Urho2DIsometricDemo.h

@@ -42,7 +42,7 @@ class Urho2DIsometricDemo : public Sample
 
 public:
     /// Construct.
-    Urho2DIsometricDemo(Context* context);
+    explicit Urho2DIsometricDemo(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/50_Urho2DPlatformer/Character2D.h

@@ -37,7 +37,7 @@ class Character2D : public LogicComponent
 
 public:
     /// Construct.
-    Character2D(Context* context);
+    explicit Character2D(Context* context);
 
     /// Register object factory and attributes.
     static void RegisterObject(Context* context);

+ 1 - 1
Source/Samples/50_Urho2DPlatformer/Urho2DPlatformer.h

@@ -44,7 +44,7 @@ class Urho2DPlatformer : public Sample
 
 public:
     /// Construct.
-    Urho2DPlatformer(Context* context);
+    explicit Urho2DPlatformer(Context* context);
 
     /// Setup after engine initialization and before running the main loop.
     void Start() override;

+ 1 - 1
Source/Samples/Sample.h

@@ -56,7 +56,7 @@ class Sample : public Application
 
 public:
     /// Construct.
-    Sample(Context* context);
+    explicit Sample(Context* context);
 
     /// Setup before engine initialization. Modifies the engine parameters.
     void Setup() override;

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

@@ -37,7 +37,7 @@ class Mover : public LogicComponent
 
 public:
     /// Construct.
-    Mover(Context* context);
+    explicit Mover(Context* context);
 
     /// Register object factory and attributes.
     static void RegisterObject(Context* context);

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

@@ -58,7 +58,7 @@ class Sample2D : public Object
 
 public:
     /// Construct.
-    Sample2D(Context* context);
+    explicit Sample2D(Context* context);
     /// Destruct.
     ~Sample2D() override = default;
 

+ 1 - 1
Source/Tools/Urho3DPlayer/Urho3DPlayer.h

@@ -33,7 +33,7 @@ class Urho3DPlayer : public Application
 
 public:
     /// Construct.
-    Urho3DPlayer(Context* context);
+    explicit Urho3DPlayer(Context* context);
 
     /// Setup before engine initialization. Verify that a script file has been specified.
     void Setup() override;

+ 7 - 7
Source/Urho3D/AngelScript/Addons.h

@@ -79,9 +79,9 @@ public:
     void       *At(asUINT index);
     const void *At(asUINT index) const;
 
-    // Set value of an element. 
+    // Set value of an element.
     // The value arg should be a pointer to the value that will be copied to the element.
-    // Remember, if the array holds handles the value parameter should be the 
+    // Remember, if the array holds handles the value parameter should be the
     // address of the handle. The refCount of the object will also be incremented
     void  SetValue(asUINT index, void *value);
 
@@ -152,7 +152,7 @@ class CScriptDictionary;
 class URHO3D_API CScriptDictValue
 {
 public:
-    // This class must not be declared as local variable in C++, because it needs 
+    // This class must not be declared as local variable in C++, because it needs
     // to receive the script engine pointer in all operations. The engine pointer
     // is not kept as member in order to keep the size down
     CScriptDictValue();
@@ -288,14 +288,14 @@ public:
 
 protected:
     // Since the dictionary uses the asAllocMem and asFreeMem functions to allocate memory
-    // the constructors are made protected so that the application cannot allocate it 
+    // the constructors are made protected so that the application cannot allocate it
     // manually in a different way
-    CScriptDictionary(asIScriptEngine *engine);
-    CScriptDictionary(asBYTE *buffer);
+    explicit CScriptDictionary(asIScriptEngine *engine);
+    explicit CScriptDictionary(asBYTE *buffer);
 
     // We don't want anyone to call the destructor directly, it should be called through the Release method
     virtual ~CScriptDictionary();
-    
+
     // Our properties
     asIScriptEngine *engine;
     mutable int refCount;

+ 1 - 1
Source/Urho3D/AngelScript/Script.cpp

@@ -44,7 +44,7 @@ class ScriptResourceRouter : public ResourceRouter
     URHO3D_OBJECT(ScriptResourceRouter, ResourceRouter);
 
     /// Construct.
-    ScriptResourceRouter(Context* context) :
+    explicit ScriptResourceRouter(Context* context) :
         ResourceRouter(context)
     {
     }

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

@@ -59,7 +59,7 @@ class URHO3D_API Script : public Object
 
 public:
     /// Construct.
-    Script(Context* context);
+    explicit Script(Context* context);
     /// Destruct. Release the AngelScript engine.
     ~Script() override;
 

+ 2 - 2
Source/Urho3D/AngelScript/ScriptFile.cpp

@@ -45,7 +45,7 @@ class ByteCodeSerializer : public asIBinaryStream
 {
 public:
     /// Construct.
-    ByteCodeSerializer(Serializer& dest) :
+    explicit ByteCodeSerializer(Serializer& dest) :
         dest_(dest)
     {
     }
@@ -72,7 +72,7 @@ class ByteCodeDeserializer : public asIBinaryStream
 {
 public:
     /// Construct.
-    ByteCodeDeserializer(MemoryBuffer& source) :
+    explicit ByteCodeDeserializer(MemoryBuffer& source) :
         source_(source)
     {
     }

+ 2 - 2
Source/Urho3D/AngelScript/ScriptFile.h

@@ -49,7 +49,7 @@ class URHO3D_API ScriptFile : public Resource, public ScriptEventListener
 
 public:
     /// Construct.
-    ScriptFile(Context* context);
+    explicit ScriptFile(Context* context);
     /// Destruct.
     ~ScriptFile() override;
     /// Register object factory.
@@ -158,7 +158,7 @@ class URHO3D_API ScriptEventInvoker : public Object
 
 public:
     /// Constructor, will create the asILockableSharedBool if a ScriptObject is passed in.
-    ScriptEventInvoker(ScriptFile* file, asIScriptObject* object = nullptr);
+    explicit ScriptEventInvoker(ScriptFile* file, asIScriptObject* object = nullptr);
     /// Destructor, release the ref it we still hold it.
     ~ScriptEventInvoker() override;
 

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

@@ -61,7 +61,7 @@ class URHO3D_API ScriptInstance : public Component, public ScriptEventListener
 
 public:
     /// Construct.
-    ScriptInstance(Context* context);
+    explicit ScriptInstance(Context* context);
     /// Destruct.
     ~ScriptInstance() override;
     /// Register object factory.

+ 1 - 1
Source/Urho3D/Audio/Audio.h

@@ -43,7 +43,7 @@ class URHO3D_API Audio : public Object
 
 public:
     /// Construct.
-    Audio(Context* context);
+    explicit Audio(Context* context);
     /// Destruct. Terminate the audio thread and free the audio buffer.
     ~Audio() override;
 

+ 1 - 1
Source/Urho3D/Audio/OggVorbisSoundStream.h

@@ -35,7 +35,7 @@ class URHO3D_API OggVorbisSoundStream : public SoundStream
 {
 public:
     /// Construct from an Ogg Vorbis compressed sound.
-    OggVorbisSoundStream(const Sound* sound);
+    explicit OggVorbisSoundStream(const Sound* sound);
     /// Destruct.
     ~OggVorbisSoundStream() override;
 

+ 1 - 1
Source/Urho3D/Audio/Sound.h

@@ -37,7 +37,7 @@ class URHO3D_API Sound : public ResourceWithMetadata
 
 public:
     /// Construct.
-    Sound(Context* context);
+    explicit Sound(Context* context);
     /// Destruct and free sound data.
     ~Sound() override;
     /// Register object factory.

+ 1 - 1
Source/Urho3D/Audio/SoundListener.h

@@ -34,7 +34,7 @@ class URHO3D_API SoundListener : public Component
 
 public:
     /// Construct.
-    SoundListener(Context* context);
+    explicit SoundListener(Context* context);
     /// Destruct.
     ~SoundListener() override;
     /// Register object factory.

+ 1 - 1
Source/Urho3D/Audio/SoundSource.h

@@ -42,7 +42,7 @@ class URHO3D_API SoundSource : public Component
 
 public:
     /// Construct.
-    SoundSource(Context* context);
+    explicit SoundSource(Context* context);
     /// Destruct. Remove self from the audio subsystem
     ~SoundSource() override;
     /// Register object factory.

+ 1 - 1
Source/Urho3D/Audio/SoundSource3D.h

@@ -36,7 +36,7 @@ class URHO3D_API SoundSource3D : public SoundSource
 
 public:
     /// Construct.
-    SoundSource3D(Context* context);
+    explicit SoundSource3D(Context* context);
     /// Register object factory.
     static void RegisterObject(Context* context);
 

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

@@ -72,7 +72,7 @@ template <class T> class Allocator
 {
 public:
     /// Construct.
-    Allocator(unsigned initialCapacity = 0) :
+    explicit Allocator(unsigned initialCapacity = 0) :
         allocator_(nullptr)
     {
         if (initialCapacity)

+ 3 - 3
Source/Urho3D/Container/ArrayPtr.h

@@ -126,7 +126,7 @@ public:
     bool operator <(const SharedArrayPtr<T>& rhs) const { return ptr_ < rhs.ptr_; }
 
     /// Convert to a raw pointer.
-    operator T*() const { return ptr_; }
+    explicit operator T*() const { return ptr_; }
 
     /// Reset to null and release the array reference.
     void Reset() { ReleaseRef(); }
@@ -247,7 +247,7 @@ public:
     }
 
     /// Construct from a shared array pointer.
-    WeakArrayPtr(const SharedArrayPtr<T>& rhs) :
+    explicit WeakArrayPtr(const SharedArrayPtr<T>& rhs) :
         ptr_(rhs.Get()),
         refCount_(rhs.RefCountPtr())
     {
@@ -340,7 +340,7 @@ public:
     bool operator <(const WeakArrayPtr<T>& rhs) const { return ptr_ < rhs.ptr_; }
 
     /// Convert to a raw pointer, null if array is expired.
-    operator T*() const { return Get(); }
+    explicit operator T*() const { return Get(); }
 
     /// Reset to null and release the weak reference.
     void Reset() { ReleaseRef(); }

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

@@ -110,7 +110,7 @@ public:
         Iterator() = default;
 
         /// Construct with a node pointer.
-        Iterator(Node* ptr) :
+        explicit Iterator(Node* ptr) :
             HashIteratorBase(ptr)
         {
         }
@@ -159,13 +159,13 @@ public:
         ConstIterator() = default;
 
         /// Construct with a node pointer.
-        ConstIterator(Node* ptr) :
+        explicit ConstIterator(Node* ptr) :
             HashIteratorBase(ptr)
         {
         }
 
         /// Construct from a non-const iterator.
-        ConstIterator(const Iterator& rhs) :
+        explicit ConstIterator(const Iterator& rhs) :
             HashIteratorBase(rhs.ptr_)
         {
         }

+ 4 - 4
Source/Urho3D/Container/HashSet.h

@@ -42,7 +42,7 @@ public:
         Node() = default;
 
         /// Construct with key.
-        Node(const T& key) :
+        explicit Node(const T& key) :
             key_(key)
         {
         }
@@ -67,7 +67,7 @@ public:
         Iterator() = default;
 
         /// Construct with a node pointer.
-        Iterator(Node* ptr) :
+        explicit Iterator(Node* ptr) :
             HashIteratorBase(ptr)
         {
         }
@@ -116,13 +116,13 @@ public:
         ConstIterator() = default;
 
         /// Construct with a node pointer.
-        ConstIterator(Node* ptr) :
+        explicit ConstIterator(Node* ptr) :
             HashIteratorBase(ptr)
         {
         }
 
         /// Construct from a non-const iterator.
-        ConstIterator(const Iterator& rhs) :
+        explicit ConstIterator(const Iterator& rhs) :
             HashIteratorBase(rhs.ptr_)
         {
         }

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

@@ -39,7 +39,7 @@ public:
         Node() = default;
 
         /// Construct with value.
-        Node(const T& value) :
+        explicit Node(const T& value) :
             value_(value)
         {
         }
@@ -116,7 +116,7 @@ public:
         }
 
         /// Construct from a non-const iterator.
-        ConstIterator(const Iterator& rhs) :
+        explicit ConstIterator(const Iterator& rhs) :
             ListIteratorBase(rhs.ptr_)
         {
         }

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

@@ -43,7 +43,7 @@ public:
     }
 
     /// Construct a null shared pointer.
-    SharedPtr(std::nullptr_t) :
+    explicit SharedPtr(std::nullptr_t) :
         ptr_(0)
     {
     }
@@ -56,7 +56,7 @@ public:
     }
 
     /// Copy-construct from another shared pointer allowing implicit upcasting.
-    template <class U> SharedPtr(const SharedPtr<U>& rhs) :
+    template <class U> explicit SharedPtr(const SharedPtr<U>& rhs) :
         ptr_(rhs.ptr_)
     {
         AddRef();
@@ -142,7 +142,7 @@ public:
     template <class U> bool operator !=(const SharedPtr<U>& rhs) const { return ptr_ != rhs.ptr_; }
 
     /// Convert to a raw pointer.
-    operator T*() const { return ptr_; }
+    explicit operator T*() const { return ptr_; }
 
     /// Swap with another SharedPtr.
     void Swap(SharedPtr& rhs) { Urho3D::Swap(ptr_, rhs.ptr_); }
@@ -251,7 +251,7 @@ public:
     }
 
     /// Construct a null weak pointer.
-    WeakPtr(std::nullptr_t) :
+    explicit WeakPtr(std::nullptr_t) :
         ptr_(0),
         refCount_(nullptr)
     {
@@ -266,7 +266,7 @@ public:
     }
 
     /// Copy-construct from another weak pointer allowing implicit upcasting.
-    template <class U> WeakPtr(const WeakPtr<U>& rhs) :
+    template <class U> explicit WeakPtr(const WeakPtr<U>& rhs) :
         ptr_(rhs.ptr_),
         refCount_(rhs.refCount_)
     {
@@ -274,7 +274,7 @@ public:
     }
 
     /// Construct from a shared pointer.
-    WeakPtr(const SharedPtr<T>& rhs) :
+    explicit WeakPtr(const SharedPtr<T>& rhs) :
         ptr_(rhs.Get()),
         refCount_(rhs.RefCountPtr())
     {
@@ -405,7 +405,7 @@ public:
     template <class U> bool operator <(const WeakPtr<U>& rhs) const { return ptr_ < rhs.ptr_; }
 
     /// Convert to a raw pointer, null if the object is expired.
-    operator T*() const { return Get(); }
+    explicit operator T*() const { return Get(); }
 
     /// Reset to null and release the weak reference.
     void Reset() { ReleaseRef(); }
@@ -544,7 +544,7 @@ public:
     }
 
     /// Construct empty.
-    UniquePtr(std::nullptr_t) { }
+    explicit UniquePtr(std::nullptr_t) { }
 
     /// Move-construct from UniquePtr.
     UniquePtr(UniquePtr && up) : ptr_(up.Detach()) { }
@@ -583,7 +583,7 @@ public:
     bool operator !=(const UniquePtr<U>& rhs) const { return ptr_ != rhs.ptr_; }
 
     /// Cast pointer to bool.
-    operator bool() const { return !!ptr_; }
+    explicit operator bool() const { return !!ptr_; }
 
     /// Swap with another UniquePtr.
     void Swap(UniquePtr& up) { Urho3D::Swap(ptr_, up.ptr_); }

+ 6 - 6
Source/Urho3D/Container/Str.h

@@ -61,7 +61,7 @@ public:
     }
 
     /// Construct from a C string.
-    String(const char* str) :
+    explicit String(const char* str) :
         length_(0),
         capacity_(0),
         buffer_(&endZero)
@@ -70,7 +70,7 @@ public:
     }
 
     /// Construct from a C string.
-    String(char* str) :
+    explicit String(char* str) :
         length_(0),
         capacity_(0),
         buffer_(&endZero)
@@ -89,7 +89,7 @@ public:
     }
 
     /// Construct from a null-terminated wide character array.
-    String(const wchar_t* str) :
+    explicit String(const wchar_t* str) :
         length_(0),
         capacity_(0),
         buffer_(&endZero)
@@ -98,7 +98,7 @@ public:
     }
 
     /// Construct from a null-terminated wide character array.
-    String(wchar_t* str) :
+    explicit String(wchar_t* str) :
         length_(0),
         capacity_(0),
         buffer_(&endZero)
@@ -107,7 +107,7 @@ public:
     }
 
     /// Construct from a wide character string.
-    String(const WString& str);
+    explicit String(const WString& str);
 
     /// Construct from an integer.
     explicit String(int value);
@@ -548,7 +548,7 @@ public:
     /// Construct empty.
     WString();
     /// Construct from a string.
-    WString(const String& str);
+    explicit WString(const String& str);
     /// Destruct.
     ~WString();
 

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

@@ -145,7 +145,7 @@ template <class T> struct RandomAccessConstIterator
     }
 
     /// Construct from a non-const iterator.
-    RandomAccessConstIterator(const RandomAccessIterator<T>& rhs) :
+    explicit RandomAccessConstIterator(const RandomAccessIterator<T>& rhs) :
         ptr_(rhs.ptr_)
     {
     }

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

@@ -65,7 +65,7 @@ class URHO3D_API EventProfiler : public Profiler
 
 public:
     /// Construct.
-    EventProfiler(Context* context);
+    explicit EventProfiler(Context* context);
 
     /// Activate the event profiler to collect information. This incurs slight performance hit on each SendEvent. By default inactive.
     static void SetActive(bool newActive) { active = newActive; }

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

@@ -57,7 +57,7 @@ class URHO3D_API MutexLock
 {
 public:
     /// Construct and acquire the mutex.
-    MutexLock(Mutex& mutex);
+    explicit MutexLock(Mutex& mutex);
     /// Destruct. Release the mutex.
     ~MutexLock();
 

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

@@ -83,7 +83,7 @@ class URHO3D_API Object : public RefCounted
 
 public:
     /// Construct.
-    Object(Context* context);
+    explicit Object(Context* context);
     /// Destruct. Clean up self from event sender & receiver structures.
     ~Object() override;
 
@@ -199,7 +199,7 @@ class URHO3D_API ObjectFactory : public RefCounted
 {
 public:
     /// Construct.
-    ObjectFactory(Context* context) :
+    explicit ObjectFactory(Context* context) :
         context_(context)
     {
         assert(context_);
@@ -232,7 +232,7 @@ template <class T> class ObjectFactoryImpl : public ObjectFactory
 {
 public:
     /// Construct.
-    ObjectFactoryImpl(Context* context) :
+    explicit ObjectFactoryImpl(Context* context) :
         ObjectFactory(context)
     {
         typeInfo_ = T::GetTypeInfoStatic();
@@ -247,7 +247,7 @@ class URHO3D_API EventHandler : public LinkedListNode
 {
 public:
     /// Construct with specified receiver and userdata.
-    EventHandler(Object* receiver, void* userData = nullptr) :
+    explicit EventHandler(Object* receiver, void* userData = nullptr) :
         receiver_(receiver),
         sender_(nullptr),
         userData_(userData)
@@ -330,7 +330,7 @@ class EventHandler11Impl : public EventHandler
 {
 public:
     /// Construct with receiver and function pointers and userdata.
-    EventHandler11Impl(std::function<void(StringHash, VariantMap&)> function, void* userData = nullptr) :
+    explicit EventHandler11Impl(std::function<void(StringHash, VariantMap&)> function, void* userData = nullptr) :
         EventHandler(nullptr, userData),
         function_(std::move(function))
     {

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

@@ -175,7 +175,7 @@ class URHO3D_API Profiler : public Object
 
 public:
     /// Construct.
-    Profiler(Context* context);
+    explicit Profiler(Context* context);
     /// Destruct.
     ~Profiler() override;
 

+ 2 - 2
Source/Urho3D/Core/Spline.h

@@ -50,9 +50,9 @@ public:
     /// Default constructor.
     Spline();
     /// Constructor setting interpolation mode.
-    Spline(InterpolationMode mode);
+    explicit Spline(InterpolationMode mode);
     /// Constructor setting knots and interpolation mode.
-    Spline(const Vector<Variant>& knots, InterpolationMode mode = BEZIER_CURVE);
+    explicit Spline(const Vector<Variant>& knots, InterpolationMode mode = BEZIER_CURVE);
     /// Copy constructor.
     Spline(const Spline& rhs);
 

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

@@ -81,7 +81,7 @@ class URHO3D_API Time : public Object
 
 public:
     /// Construct.
-    Time(Context* context);
+    explicit Time(Context* context);
     /// Destruct. Reset the low-resolution timer period if set.
     ~Time() override;
 

+ 36 - 36
Source/Urho3D/Core/Variant.h

@@ -90,7 +90,7 @@ struct URHO3D_API ResourceRef
     ResourceRef() = default;
 
     /// Construct with type only and empty id.
-    ResourceRef(StringHash type) :
+    explicit ResourceRef(StringHash type) :
         type_(type)
     {
     }
@@ -138,7 +138,7 @@ struct URHO3D_API ResourceRefList
     ResourceRefList() = default;
 
     /// Construct with type only.
-    ResourceRefList(StringHash type) :
+    explicit ResourceRefList(StringHash type) :
         type_(type)
     {
     }
@@ -170,7 +170,7 @@ class CustomVariantValue
 
 private:
     /// Construct from type info.
-    CustomVariantValue(const std::type_info& typeInfo) : typeInfo_(typeInfo) {}
+    explicit CustomVariantValue(const std::type_info& typeInfo) : typeInfo_(typeInfo) {}
 
 public:
     /// Construct empty.
@@ -228,7 +228,7 @@ public:
     /// Type traits.
     using Traits = CustomVariantValueTraits<T>;
     /// Construct from value.
-    CustomVariantValueImpl(const T& value) : CustomVariantValue(typeid(T)), value_(value) {}
+    explicit CustomVariantValueImpl(const T& value) : CustomVariantValue(typeid(T)), value_(value) {}
     /// Set value.
     void SetValue(const T& value) { value_ = value; }
     /// Get value.
@@ -326,194 +326,194 @@ public:
     Variant() = default;
 
     /// Construct from integer.
-    Variant(int value)
+    explicit Variant(int value)
     {
         *this = value;
     }
 
     /// Construct from 64 bit integer.
-    Variant(long long value)
+    explicit Variant(long long value)
     {
         *this = value;
     }
 
     /// Construct from unsigned integer.
-    Variant(unsigned value)
+    explicit Variant(unsigned value)
     {
         *this = (int)value;
     }
 
     /// Construct from unsigned integer.
-    Variant(unsigned long long value)
+    explicit Variant(unsigned long long value)
     {
         *this = (long long)value;
     }
 
     /// Construct from a string hash (convert to integer).
-    Variant(const StringHash& value)
+    explicit Variant(const StringHash& value)
     {
         *this = (int)value.Value();
     }
 
     /// Construct from a bool.
-    Variant(bool value)
+    explicit Variant(bool value)
     {
         *this = value;
     }
 
     /// Construct from a float.
-    Variant(float value)
+    explicit Variant(float value)
     {
         *this = value;
     }
 
     /// Construct from a double.
-    Variant(double value)
+    explicit Variant(double value)
     {
         *this = value;
     }
 
     /// Construct from a Vector2.
-    Variant(const Vector2& value)
+    explicit Variant(const Vector2& value)
     {
         *this = value;
     }
 
     /// Construct from a Vector3.
-    Variant(const Vector3& value)
+    explicit Variant(const Vector3& value)
     {
         *this = value;
     }
 
     /// Construct from a Vector4.
-    Variant(const Vector4& value)
+    explicit Variant(const Vector4& value)
     {
         *this = value;
     }
 
     /// Construct from a quaternion.
-    Variant(const Quaternion& value)
+    explicit Variant(const Quaternion& value)
     {
         *this = value;
     }
 
     /// Construct from a color.
-    Variant(const Color& value)
+    explicit Variant(const Color& value)
     {
         *this = value;
     }
 
     /// Construct from a string.
-    Variant(const String& value)
+    explicit Variant(const String& value)
     {
         *this = value;
     }
 
     /// Construct from a C string.
-    Variant(const char* value)
+    explicit Variant(const char* value)
     {
         *this = value;
     }
 
     /// Construct from a buffer.
-    Variant(const PODVector<unsigned char>& value)
+    explicit Variant(const PODVector<unsigned char>& value)
     {
         *this = value;
     }
 
     /// Construct from a %VectorBuffer and store as a buffer.
-    Variant(const VectorBuffer& value)
+    explicit Variant(const VectorBuffer& value)
     {
         *this = value;
     }
 
     /// Construct from a pointer.
-    Variant(void* value)
+    explicit Variant(void* value)
     {
         *this = value;
     }
 
     /// Construct from a resource reference.
-    Variant(const ResourceRef& value)
+    explicit Variant(const ResourceRef& value)
     {
         *this = value;
     }
 
     /// Construct from a resource reference list.
-    Variant(const ResourceRefList& value)
+    explicit Variant(const ResourceRefList& value)
     {
         *this = value;
     }
 
     /// Construct from a variant vector.
-    Variant(const VariantVector& value)
+    explicit Variant(const VariantVector& value)
     {
         *this = value;
     }
 
     /// Construct from a variant map.
-    Variant(const VariantMap& value)
+    explicit Variant(const VariantMap& value)
     {
         *this = value;
     }
 
     /// Construct from a string vector.
-    Variant(const StringVector& value)
+    explicit Variant(const StringVector& value)
     {
         *this = value;
     }
 
     /// Construct from a rect.
-    Variant(const Rect& value)
+    explicit Variant(const Rect& value)
     {
         *this = value;
     }
 
     /// Construct from an integer rect.
-    Variant(const IntRect& value)
+    explicit Variant(const IntRect& value)
     {
         *this = value;
     }
 
     /// Construct from an IntVector2.
-    Variant(const IntVector2& value)
+    explicit Variant(const IntVector2& value)
     {
         *this = value;
     }
 
     /// Construct from an IntVector3.
-    Variant(const IntVector3& value)
+    explicit Variant(const IntVector3& value)
     {
         *this = value;
     }
 
     /// Construct from a RefCounted pointer. The object will be stored internally in a WeakPtr so that its expiration can be detected safely.
-    Variant(RefCounted* value)
+    explicit Variant(RefCounted* value)
     {
         *this = value;
     }
 
     /// Construct from a Matrix3.
-    Variant(const Matrix3& value)
+    explicit Variant(const Matrix3& value)
     {
         *this = value;
     }
 
     /// Construct from a Matrix3x4.
-    Variant(const Matrix3x4& value)
+    explicit Variant(const Matrix3x4& value)
     {
         *this = value;
     }
 
     /// Construct from a Matrix4.
-    Variant(const Matrix4& value)
+    explicit Variant(const Matrix4& value)
     {
         *this = value;
     }
 
     /// Construct from custom value.
     template <class T>
-    Variant(const CustomVariantValueImpl<T>& value)
+    explicit Variant(const CustomVariantValueImpl<T>& value)
     {
         *this = value;
     }

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

@@ -80,7 +80,7 @@ class URHO3D_API WorkQueue : public Object
 
 public:
     /// Construct.
-    WorkQueue(Context* context);
+    explicit WorkQueue(Context* context);
     /// Destruct.
     ~WorkQueue() override;
 

+ 1 - 1
Source/Urho3D/Database/Database.h

@@ -44,7 +44,7 @@ class URHO3D_API Database : public Object
 
 public:
     /// Construct.
-    Database(Context* context_);
+    explicit Database(Context* context_);
     /// Return the underlying database API.
     static DBAPI GetAPI();
 

+ 1 - 1
Source/Urho3D/Engine/Application.h

@@ -38,7 +38,7 @@ class URHO3D_API Application : public Object
 
 public:
     /// Construct. Parse default engine parameters from the command line, and create the engine in an uninitialized state.
-    Application(Context* context);
+    explicit Application(Context* context);
 
     /// Setup before engine initialization. This is a chance to eg. modify the engine parameters. Call ErrorExit() to terminate without initializing the engine. Called by Application.
     virtual void Setup() { }

+ 1 - 1
Source/Urho3D/Engine/Console.h

@@ -45,7 +45,7 @@ class URHO3D_API Console : public Object
 
 public:
     /// Construct.
-    Console(Context* context);
+    explicit Console(Context* context);
     /// Destruct.
     ~Console() override;
 

+ 1 - 1
Source/Urho3D/Engine/DebugHud.h

@@ -48,7 +48,7 @@ class URHO3D_API DebugHud : public Object
 
 public:
     /// Construct.
-    DebugHud(Context* context);
+    explicit DebugHud(Context* context);
     /// Destruct.
     ~DebugHud() override;
 

+ 1 - 1
Source/Urho3D/Engine/Engine.h

@@ -38,7 +38,7 @@ class URHO3D_API Engine : public Object
 
 public:
     /// Construct.
-    Engine(Context* context);
+    explicit Engine(Context* context);
     /// Destruct. Free all subsystems.
     ~Engine() override;
 

+ 1 - 1
Source/Urho3D/Graphics/AnimatedModel.h

@@ -41,7 +41,7 @@ class URHO3D_API AnimatedModel : public StaticModel
 
 public:
     /// Construct.
-    AnimatedModel(Context* context);
+    explicit AnimatedModel(Context* context);
     /// Destruct.
     ~AnimatedModel() override;
     /// Register object factory. Drawable must be registered first.

+ 1 - 1
Source/Urho3D/Graphics/Animation.h

@@ -113,7 +113,7 @@ class URHO3D_API Animation : public ResourceWithMetadata
 
 public:
     /// Construct.
-    Animation(Context* context);
+    explicit Animation(Context* context);
     /// Destruct.
     ~Animation() override;
     /// Register object factory.

+ 1 - 1
Source/Urho3D/Graphics/AnimationController.h

@@ -87,7 +87,7 @@ class URHO3D_API AnimationController : public Component
 
 public:
     /// Construct.
-    AnimationController(Context* context);
+    explicit AnimationController(Context* context);
     /// Destruct.
     ~AnimationController() override;
     /// Register object factory.

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

@@ -57,7 +57,7 @@ struct Batch
     }
 
     /// Construct from a drawable's source batch.
-    Batch(const SourceBatch& rhs) :
+    explicit Batch(const SourceBatch& rhs) :
         distance_(rhs.distance_),
         renderOrder_(rhs.material_ ? rhs.material_->GetRenderOrder() : DEFAULT_RENDER_ORDER),
         isBase_(false),
@@ -144,7 +144,7 @@ struct BatchGroup : public Batch
     }
 
     /// Construct from a batch.
-    BatchGroup(const Batch& batch) :
+    explicit BatchGroup(const Batch& batch) :
         Batch(batch),
         startIndex_(M_MAX_UNSIGNED)
     {
@@ -185,7 +185,7 @@ struct BatchGroupKey
     BatchGroupKey() = default;
 
     /// Construct from a batch.
-    BatchGroupKey(const Batch& batch) :
+    explicit BatchGroupKey(const Batch& batch) :
         zone_(batch.zone_),
         lightQueue_(batch.lightQueue_),
         pass_(batch.pass_),

Некоторые файлы не были показаны из-за большого количества измененных файлов