bagobor 11 лет назад
Родитель
Сommit
6ce695a414

+ 1 - 1
Core/Contents/Include/PolyBone.h

@@ -40,7 +40,7 @@ namespace Polycode {
 			* Constructor.
 			* @param boneName Name of the bone.
 			*/				
-			Bone(const String& boneName);
+			explicit Bone(const String& boneName);
 			virtual ~Bone();
 			
 			/**

+ 1 - 1
Core/Contents/Include/PolyCamera.h

@@ -66,7 +66,7 @@ namespace Polycode {
 			* Constructor.
 			* @param parentScene Scene to add the camera to.
 			*/
-			Camera(Scene *parentScene);
+			explicit Camera(Scene *parentScene);
 			virtual ~Camera();
 			
 			void buildFrustumPlanes();

+ 1 - 1
Core/Contents/Include/PolyGLVertexBuffer.h

@@ -42,7 +42,7 @@ namespace Polycode {
 	class _PolyExport OpenGLVertexBuffer : public VertexBuffer {
 	public:
 		
-		OpenGLVertexBuffer(Mesh *mesh);
+		explicit OpenGLVertexBuffer(Mesh *mesh);
 		virtual ~OpenGLVertexBuffer();
 		
 		GLuint getVertexBufferID();		

+ 1 - 1
Core/Contents/Include/PolyImage.h

@@ -39,7 +39,7 @@ namespace Polycode {
 			* Create image from file name.
 			* @param fileName Path to image file to load.
 			*/ 
-			Image(const String& fileName);
+			explicit Image(const String& fileName);
 			
 			/**
 			* Create a blank image of specified size and type.

+ 1 - 1
Core/Contents/Include/PolyMaterial.h

@@ -35,7 +35,7 @@ namespace Polycode {
 
 	class _PolyExport Material : public Resource {
 		public:
-			Material(const String& name);
+			explicit Material(const String& name);
 			virtual ~Material();
 			
 			void addShader(Shader *shader,ShaderBinding *shaderBinding);

+ 2 - 2
Core/Contents/Include/PolyMesh.h

@@ -120,13 +120,13 @@ namespace Polycode {
 			* Construct with an empty mesh of specified type.
 			* @param meshType Type of mesh. Possible values are: Mesh::QUAD_MESH, Mesh::TRI_MESH, Mesh::TRIFAN_MESH, Mesh::TRISTRIP_MESH, Mesh::LINE_MESH, Mesh::POINT_MESH.
 			*/			
-			Mesh(int meshType);
+			explicit Mesh(int meshType);
 					
 			/**
 			* Construct from a mesh loaded from a file.
 			* @param fileName Path to mesh file.
 			*/
-			Mesh(const String& fileName);
+			explicit Mesh(const String& fileName);
 
 			/**
 			* Construct from a mesh loaded from a file.

+ 1 - 1
Core/Contents/Include/PolySceneEntityInstance.h

@@ -42,7 +42,7 @@ class SceneEntityInstance : public Entity {
 	public:
     
         SceneEntityInstance(Scene *parentScene, const String& fileName);
-		SceneEntityInstance(Scene *parentScene);
+		explicit SceneEntityInstance(Scene *parentScene);
 		
 		static SceneEntityInstance *BlankSceneEntityInstance(Scene *parentScene);
 

+ 3 - 3
Core/Contents/Include/PolySceneImage.h

@@ -36,19 +36,19 @@ namespace Polycode {
 		* Create screen image from file.
 		* @param fileName 
 		*/
-		SceneImage(const String& fileName);
+		explicit SceneImage(const String& fileName);
 
 		/**
 		* Create screen image from Image.
 		* @param image Image to create from.
 		*/		
-		SceneImage(Image *image);		
+		explicit SceneImage(Image *image);
 
 		/**
 		 * Create screen image from Texture.
 		 * @param texture Texture to create from.
 		 */		
-		SceneImage(Texture *texture);		
+		explicit SceneImage(Texture *texture);
 
 		/**
 		* Create screen image from Image.

+ 3 - 3
Core/Contents/Include/PolySceneMesh.h

@@ -44,18 +44,18 @@ namespace Polycode {
 			* Construct a scene mesh from a mesh file.
 			* @param fileName Path to mesh file to load.
 			*/
-			SceneMesh(const String& fileName);
+			explicit SceneMesh(const String& fileName);
 			
 			/**
 			* Construct an empty scene mesh with the specified type.
 			* @param meshType Mesh type to create. See Mesh for possible values.
 			*/			
-			SceneMesh(int meshType);		
+			explicit SceneMesh(int meshType);
 			
 			/**
 			* Construct scene mesh from an existing Mesh instance.
 			*/
-			SceneMesh(Mesh *mesh);
+			explicit SceneMesh(Mesh *mesh);
 			
 			/**
 			* Construct scene mesh from an existing Mesh instance.

+ 2 - 2
Core/Contents/Include/PolyShader.h

@@ -64,7 +64,7 @@ namespace Polycode {
 
 	class _PolyExport ShaderProgram : public Resource {
 		public:
-			ShaderProgram(int type);
+			explicit ShaderProgram(int type);
 			virtual ~ShaderProgram();
 			
 			virtual void reloadProgram() {}
@@ -80,7 +80,7 @@ namespace Polycode {
 
 	class _PolyExport Shader : public Resource {
 		public:
-			Shader(int type);
+			explicit Shader(int type);
 			virtual ~Shader();
 
 			int getType() const;