From dd2806c8bd63dda28a6105e91584555cbf41c9d2 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 6 Nov 2017 19:47:38 +0100 Subject: [PATCH] Mark constructors 'explicit' for which coercion makes no sense --- contrib/src/ai/aiCharacter.h | 2 +- contrib/src/ai/aiNode.h | 2 +- contrib/src/ai/flock.h | 2 +- .../src/distributed/cConnectionRepository.h | 4 +- direct/src/interval/cConstrainHprInterval.h | 6 +-- .../src/interval/cConstrainPosHprInterval.h | 8 ++-- direct/src/interval/cConstrainPosInterval.h | 6 +-- .../interval/cConstrainTransformInterval.h | 6 +-- direct/src/interval/cLerpAnimEffectInterval.h | 4 +- direct/src/interval/cLerpNodePathInterval.h | 8 ++-- direct/src/interval/cMetaInterval.h | 2 +- direct/src/interval/hideInterval.h | 2 +- direct/src/interval/showInterval.h | 2 +- direct/src/interval/waitInterval.h | 2 +- dtool/src/dtoolutil/pandaFileStream.h | 6 +-- dtool/src/prc/configVariable.h | 2 +- dtool/src/prc/encryptStream.h | 8 ++-- dtool/src/prc/streamReader.h | 2 +- dtool/src/prc/streamWrapper.h | 6 +-- dtool/src/prc/streamWriter.h | 2 +- panda/src/audio/audioLoadRequest.h | 5 ++- .../bulletBaseCharacterControllerNode.h | 3 +- panda/src/bullet/bulletBoxShape.h | 2 +- panda/src/bullet/bulletCapsuleShape.h | 3 +- .../bullet/bulletCharacterControllerNode.h | 4 +- panda/src/bullet/bulletConeShape.h | 3 +- panda/src/bullet/bulletConeTwistConstraint.h | 12 +++--- .../src/bullet/bulletConvexPointCloudShape.h | 5 +-- panda/src/bullet/bulletCylinderShape.h | 5 +-- panda/src/bullet/bulletDebugNode.h | 3 +- panda/src/bullet/bulletGenericConstraint.h | 17 ++++---- panda/src/bullet/bulletGhostNode.h | 3 +- panda/src/bullet/bulletHeightfieldShape.h | 5 +-- panda/src/bullet/bulletHingeConstraint.h | 39 +++++++++---------- panda/src/bullet/bulletMinkowskiSumShape.h | 3 +- panda/src/bullet/bulletMultiSphereShape.h | 3 +- panda/src/bullet/bulletPlaneShape.h | 2 +- panda/src/bullet/bulletSliderConstraint.h | 17 ++++---- panda/src/bullet/bulletSphereShape.h | 2 +- panda/src/bullet/bulletSphericalConstraint.h | 13 +++---- panda/src/bullet/bulletTriangleMeshShape.h | 2 +- panda/src/chan/animBundle.h | 2 +- panda/src/chan/animBundleNode.h | 2 +- panda/src/chan/animChannelMatrixXfmTable.h | 2 +- panda/src/chan/animGroup.h | 2 +- panda/src/chan/bindAnimRequest.h | 14 +++---- panda/src/chan/partBundle.h | 2 +- panda/src/chan/partBundleNode.h | 2 +- panda/src/chan/partGroup.h | 2 +- panda/src/char/character.h | 2 +- panda/src/char/characterJoint.h | 6 +-- panda/src/char/characterJointBundle.h | 2 +- panda/src/char/characterSlider.h | 2 +- panda/src/collide/collisionBox.h | 6 +-- panda/src/collide/collisionInvSphere.h | 4 +- panda/src/collide/collisionLine.h | 6 +-- panda/src/collide/collisionNode.h | 2 +- panda/src/collide/collisionParabola.h | 2 +- panda/src/collide/collisionRay.h | 6 +-- panda/src/collide/collisionSegment.h | 6 +-- panda/src/collide/collisionSphere.h | 4 +- panda/src/collide/collisionTraverser.h | 2 +- panda/src/collide/collisionTube.h | 10 ++--- panda/src/collide/collisionVisualizer.h | 2 +- panda/src/device/analogNode.h | 2 +- panda/src/device/buttonNode.h | 2 +- panda/src/device/dialNode.h | 2 +- panda/src/device/mouseAndKeyboard.h | 2 +- panda/src/device/trackerNode.h | 4 +- panda/src/device/virtualMouse.h | 2 +- panda/src/dgraph/dataGraphTraverser.h | 2 +- panda/src/dgraph/dataNode.h | 2 +- panda/src/display/graphicsEngine.h | 2 +- panda/src/distort/projectionScreen.h | 2 +- panda/src/downloader/downloadDb.h | 4 +- panda/src/downloader/httpCookie.h | 5 ++- panda/src/downloader/patcher.h | 2 +- panda/src/downloader/virtualFileMountHTTP.h | 2 +- panda/src/egg/eggAnimData.h | 3 +- panda/src/egg/eggAnimPreload.h | 2 +- panda/src/egg/eggBin.h | 2 +- panda/src/egg/eggComment.h | 2 +- panda/src/egg/eggCompositePrimitive.h | 2 +- panda/src/egg/eggCurve.h | 2 +- panda/src/egg/eggExternalReference.h | 2 +- panda/src/egg/eggFilenameNode.h | 2 +- panda/src/egg/eggGroup.h | 2 +- panda/src/egg/eggGroupNode.h | 2 +- panda/src/egg/eggGroupUniquifier.h | 2 +- panda/src/egg/eggLine.h | 2 +- panda/src/egg/eggMaterial.h | 2 +- panda/src/egg/eggNamedObject.h | 2 +- panda/src/egg/eggNode.h | 2 +- panda/src/egg/eggNurbsCurve.h | 2 +- panda/src/egg/eggNurbsSurface.h | 2 +- panda/src/egg/eggPatch.h | 2 +- panda/src/egg/eggPoint.h | 2 +- panda/src/egg/eggPolygon.h | 2 +- panda/src/egg/eggPrimitive.h | 2 +- panda/src/egg/eggSAnimData.h | 2 +- panda/src/egg/eggSurface.h | 2 +- panda/src/egg/eggSwitchCondition.h | 4 +- panda/src/egg/eggTable.h | 2 +- panda/src/egg/eggTexture.h | 2 +- panda/src/egg/eggTriangleFan.h | 2 +- panda/src/egg/eggTriangleStrip.h | 2 +- panda/src/egg/eggVertexAux.h | 2 +- panda/src/egg/eggVertexPool.h | 2 +- panda/src/egg/eggVertexUV.h | 4 +- panda/src/egg/eggXfmAnimData.h | 4 +- panda/src/egg/eggXfmSAnim.h | 4 +- panda/src/egg2pg/animBundleMaker.h | 2 +- panda/src/event/asyncTaskManager.h | 2 +- panda/src/event/asyncTaskSequence.h | 2 +- panda/src/event/eventHandler.h | 2 +- panda/src/express/patchfile.h | 2 +- panda/src/express/profileTimer.h | 2 +- panda/src/express/subStream.h | 6 +-- panda/src/express/subfileInfo.h | 4 +- panda/src/express/temporaryFile.h | 2 +- panda/src/express/zStream.h | 6 +-- panda/src/gobj/adaptiveLru.h | 4 +- panda/src/gobj/animateVerticesRequest.h | 2 +- panda/src/gobj/geomLines.h | 2 +- panda/src/gobj/geomLinestrips.h | 2 +- panda/src/gobj/geomPatches.h | 2 +- panda/src/gobj/geomPoints.h | 2 +- panda/src/gobj/geomPrimitive.h | 2 +- panda/src/gobj/geomTriangles.h | 2 +- panda/src/gobj/geomTrifans.h | 2 +- panda/src/gobj/geomTristrips.h | 2 +- panda/src/gobj/geomVertexColumn.h | 8 ++-- panda/src/gobj/perspectiveLens.h | 2 +- panda/src/gobj/shaderBuffer.h | 4 +- panda/src/gobj/simpleAllocator.h | 2 +- panda/src/gobj/simpleLru.h | 4 +- panda/src/gobj/textureReloadRequest.h | 7 ++-- panda/src/gobj/userVertexSlider.h | 4 +- panda/src/gobj/userVertexTransform.h | 2 +- panda/src/gobj/vertexDataBook.h | 2 +- panda/src/gobj/vertexSlider.h | 2 +- panda/src/grutil/cardMaker.h | 2 +- panda/src/grutil/fisheyeMaker.h | 2 +- panda/src/grutil/frameRateMeter.h | 2 +- panda/src/grutil/geoMipTerrain.h | 2 +- panda/src/grutil/heightfieldTesselator.h | 2 +- panda/src/grutil/lineSegs.h | 2 +- panda/src/grutil/movieTexture.h | 4 +- panda/src/grutil/pfmVizzer.h | 2 +- panda/src/grutil/pipeOcclusionCullTraverser.h | 2 +- panda/src/grutil/rigidBodyCombiner.h | 2 +- panda/src/grutil/sceneGraphAnalyzerMeter.h | 2 +- panda/src/mathutil/boundingBox.h | 2 +- panda/src/mathutil/boundingLine.h | 2 +- panda/src/mathutil/boundingSphere.h | 2 +- panda/src/mathutil/mersenne.h | 2 +- panda/src/mathutil/perlinNoise2.h | 6 +-- panda/src/mathutil/perlinNoise3.h | 5 ++- panda/src/mathutil/randomizer.h | 2 +- panda/src/mathutil/stackedPerlinNoise2.h | 6 +-- panda/src/mathutil/stackedPerlinNoise3.h | 6 +-- panda/src/movies/flacAudioCursor.h | 2 +- panda/src/movies/inkblotVideo.h | 7 ++-- panda/src/movies/opusAudioCursor.h | 2 +- panda/src/movies/vorbisAudioCursor.h | 2 +- panda/src/movies/wavAudioCursor.h | 2 +- .../nativenet/buffered_datagramconnection.h | 2 +- panda/src/nativenet/socket_address.h | 2 +- panda/src/net/connection.h | 2 +- panda/src/net/connectionReader.h | 4 +- panda/src/net/connectionWriter.h | 4 +- panda/src/net/datagramGeneratorNet.h | 2 +- panda/src/net/datagramSinkNet.h | 2 +- panda/src/net/queuedConnectionListener.h | 2 +- panda/src/net/queuedConnectionReader.h | 2 +- panda/src/net/recentConnectionReader.h | 2 +- panda/src/parametrics/ropeNode.h | 2 +- panda/src/parametrics/sheetNode.h | 2 +- .../colorInterpolationManager.h | 5 ++- .../src/particlesystem/geomParticleRenderer.h | 4 +- .../src/particlesystem/lineParticleRenderer.h | 6 +-- panda/src/particlesystem/particleSystem.h | 2 +- .../particlesystem/particleSystemManager.h | 2 +- .../particlesystem/pointParticleRenderer.h | 12 +++--- .../particlesystem/sparkleParticleRenderer.h | 12 +++--- .../particlesystem/spriteParticleRenderer.h | 2 +- panda/src/pgraph/fog.h | 2 +- panda/src/pgraph/lensNode.h | 2 +- panda/src/pgraph/loader.h | 2 +- panda/src/pgraph/modelFlattenRequest.h | 2 +- panda/src/pgraph/modelLoadRequest.h | 8 ++-- panda/src/pgraph/modelNode.h | 2 +- panda/src/pgraph/modelRoot.h | 4 +- panda/src/pgraph/modelSaveRequest.h | 8 ++-- panda/src/pgraph/occluderNode.h | 2 +- panda/src/pgraph/planeNode.h | 2 +- panda/src/pgraph/polylightNode.h | 2 +- panda/src/pgraph/portalNode.h | 4 +- panda/src/pgraph/sceneGraphReducer.h | 2 +- panda/src/pgraph/shaderInput.h | 4 +- panda/src/pgraphnodes/ambientLight.h | 2 +- panda/src/pgraphnodes/callbackNode.h | 2 +- panda/src/pgraphnodes/computeNode.h | 2 +- panda/src/pgraphnodes/directionalLight.h | 2 +- panda/src/pgraphnodes/fadeLodNode.h | 2 +- panda/src/pgraphnodes/lightLensNode.h | 2 +- panda/src/pgraphnodes/lightNode.h | 2 +- panda/src/pgraphnodes/lodNode.h | 2 +- panda/src/pgraphnodes/pointLight.h | 2 +- panda/src/pgraphnodes/rectangleLight.h | 2 +- panda/src/pgraphnodes/selectiveChildNode.h | 2 +- panda/src/pgraphnodes/sequenceNode.h | 2 +- panda/src/pgraphnodes/sphereLight.h | 2 +- panda/src/pgraphnodes/switchNode.h | 2 +- panda/src/pgraphnodes/uvScrollNode.h | 4 +- panda/src/pgui/pgButton.h | 2 +- panda/src/pgui/pgEntry.h | 2 +- panda/src/pgui/pgItem.h | 2 +- panda/src/pgui/pgScrollFrame.h | 2 +- panda/src/pgui/pgSliderBar.h | 2 +- panda/src/pgui/pgTop.h | 2 +- panda/src/pgui/pgVirtualFrame.h | 2 +- panda/src/pgui/pgWaitBar.h | 2 +- panda/src/physics/actorNode.h | 2 +- panda/src/physics/angularVectorForce.h | 4 +- panda/src/physics/forceNode.h | 2 +- panda/src/physics/linearControlForce.h | 4 +- panda/src/physics/linearCylinderVortexForce.h | 10 ++--- panda/src/physics/linearFrictionForce.h | 2 +- panda/src/physics/linearJitterForce.h | 2 +- panda/src/physics/linearNoiseForce.h | 2 +- panda/src/physics/linearSinkForce.h | 4 +- panda/src/physics/linearSourceForce.h | 4 +- panda/src/physics/linearUserDefinedForce.h | 5 +-- panda/src/physics/linearVectorForce.h | 6 +-- panda/src/physics/physical.h | 2 +- panda/src/physics/physicalNode.h | 2 +- panda/src/physx/physxClothNode.h | 3 +- panda/src/physx/physxSoftBodyNode.h | 3 +- panda/src/pipeline/conditionVar.h | 2 +- panda/src/pipeline/conditionVarDebug.h | 2 +- panda/src/pipeline/conditionVarDirect.h | 2 +- panda/src/pipeline/conditionVarFull.h | 2 +- panda/src/pipeline/conditionVarFullDebug.h | 2 +- panda/src/pipeline/conditionVarFullDirect.h | 2 +- panda/src/pipeline/lightMutex.h | 4 +- panda/src/pipeline/lightReMutex.h | 4 +- panda/src/pipeline/pmutex.h | 2 +- panda/src/pipeline/psemaphore.h | 2 +- panda/src/pipeline/pythonThread.h | 4 +- panda/src/pipeline/reMutex.h | 4 +- panda/src/pnmimage/pnmPainter.h | 2 +- panda/src/pnmtext/pnmTextGlyph.h | 2 +- panda/src/pnmtext/pnmTextMaker.h | 6 +-- panda/src/pstatclient/pStatCollector.h | 8 ++-- panda/src/putil/bamReader.h | 2 +- panda/src/putil/bamWriter.h | 2 +- panda/src/putil/uniqueIdAllocator.h | 2 +- panda/src/recorder/mouseRecorder.h | 2 +- panda/src/recorder/socketStreamRecorder.h | 2 +- panda/src/speedtree/speedTreeNode.h | 2 +- panda/src/text/textAssembler.h | 2 +- panda/src/text/textGraphic.h | 4 +- panda/src/text/textNode.h | 4 +- panda/src/tform/buttonThrower.h | 2 +- panda/src/tform/driveInterface.h | 2 +- panda/src/tform/mouseInterfaceNode.h | 2 +- panda/src/tform/mouseSubregion.h | 2 +- panda/src/tform/mouseWatcher.h | 2 +- panda/src/tform/mouseWatcherRegion.h | 6 +-- panda/src/tform/trackball.h | 2 +- panda/src/tform/transform2sg.h | 2 +- panda/src/vrpn/vrpnClient.h | 2 +- 273 files changed, 450 insertions(+), 462 deletions(-) diff --git a/contrib/src/ai/aiCharacter.h b/contrib/src/ai/aiCharacter.h index 9fd0833a99..244f9bc45e 100644 --- a/contrib/src/ai/aiCharacter.h +++ b/contrib/src/ai/aiCharacter.h @@ -62,7 +62,7 @@ PUBLISHED: // This function is used to enable or disable the guides for path finding. void set_pf_guide(bool pf_guide); - AICharacter(string model_name, NodePath model_np, double mass, double movt_force, double max_force); + explicit AICharacter(string model_name, NodePath model_np, double mass, double movt_force, double max_force); ~AICharacter(); }; diff --git a/contrib/src/ai/aiNode.h b/contrib/src/ai/aiNode.h index ab0c48c1c7..f6a6ea737e 100644 --- a/contrib/src/ai/aiNode.h +++ b/contrib/src/ai/aiNode.h @@ -66,7 +66,7 @@ public: AINode *_next; PUBLISHED: - AINode(int grid_x, int grid_y, LVecBase3 pos, float w, float l, float h); + explicit AINode(int grid_x, int grid_y, LVecBase3 pos, float w, float l, float h); ~AINode(); bool contains(float x, float y); diff --git a/contrib/src/ai/flock.h b/contrib/src/ai/flock.h index 58595310d6..c5e508a837 100644 --- a/contrib/src/ai/flock.h +++ b/contrib/src/ai/flock.h @@ -44,7 +44,7 @@ public: AICharList _ai_char_list; PUBLISHED: - Flock(unsigned int flock_id, double vcone_angle, double vcone_radius, unsigned int separation_wt = 2, + explicit Flock(unsigned int flock_id, double vcone_angle, double vcone_radius, unsigned int separation_wt = 2, unsigned int cohesion_wt = 4, unsigned int alignment_wt = 1); ~Flock(); diff --git a/direct/src/distributed/cConnectionRepository.h b/direct/src/distributed/cConnectionRepository.h index 8d62c21d86..fbc494423e 100644 --- a/direct/src/distributed/cConnectionRepository.h +++ b/direct/src/distributed/cConnectionRepository.h @@ -55,8 +55,8 @@ class SocketStream; */ class EXPCL_DIRECT CConnectionRepository { PUBLISHED: - CConnectionRepository(bool has_owner_view = false, - bool threaded_net = false); + explicit CConnectionRepository(bool has_owner_view = false, + bool threaded_net = false); ~CConnectionRepository(); /* diff --git a/direct/src/interval/cConstrainHprInterval.h b/direct/src/interval/cConstrainHprInterval.h index 42c52df558..a618b98641 100644 --- a/direct/src/interval/cConstrainHprInterval.h +++ b/direct/src/interval/cConstrainHprInterval.h @@ -26,9 +26,9 @@ */ class EXPCL_DIRECT CConstrainHprInterval : public CConstraintInterval { PUBLISHED: - CConstrainHprInterval(const string &name, double duration, - const NodePath &node, const NodePath &target, - bool wrt, const LVecBase3 hprOffset=LVector3::zero()); + explicit CConstrainHprInterval(const string &name, double duration, + const NodePath &node, const NodePath &target, + bool wrt, const LVecBase3 hprOffset=LVector3::zero()); INLINE const NodePath &get_node() const; INLINE const NodePath &get_target() const; diff --git a/direct/src/interval/cConstrainPosHprInterval.h b/direct/src/interval/cConstrainPosHprInterval.h index fcdcd39c32..d3ce5efa4f 100644 --- a/direct/src/interval/cConstrainPosHprInterval.h +++ b/direct/src/interval/cConstrainPosHprInterval.h @@ -26,10 +26,10 @@ */ class EXPCL_DIRECT CConstrainPosHprInterval : public CConstraintInterval { PUBLISHED: - CConstrainPosHprInterval(const string &name, double duration, - const NodePath &node, const NodePath &target, - bool wrt, const LVecBase3 posOffset=LVector3::zero(), - const LVecBase3 hprOffset=LVector3::zero()); + explicit CConstrainPosHprInterval(const string &name, double duration, + const NodePath &node, const NodePath &target, + bool wrt, const LVecBase3 posOffset=LVector3::zero(), + const LVecBase3 hprOffset=LVector3::zero()); INLINE const NodePath &get_node() const; INLINE const NodePath &get_target() const; diff --git a/direct/src/interval/cConstrainPosInterval.h b/direct/src/interval/cConstrainPosInterval.h index aa05a0f427..92055cd0a4 100644 --- a/direct/src/interval/cConstrainPosInterval.h +++ b/direct/src/interval/cConstrainPosInterval.h @@ -25,9 +25,9 @@ */ class EXPCL_DIRECT CConstrainPosInterval : public CConstraintInterval { PUBLISHED: - CConstrainPosInterval(const string &name, double duration, - const NodePath &node, const NodePath &target, - bool wrt, const LVecBase3 posOffset=LVector3::zero()); + explicit CConstrainPosInterval(const string &name, double duration, + const NodePath &node, const NodePath &target, + bool wrt, const LVecBase3 posOffset=LVector3::zero()); INLINE const NodePath &get_node() const; INLINE const NodePath &get_target() const; diff --git a/direct/src/interval/cConstrainTransformInterval.h b/direct/src/interval/cConstrainTransformInterval.h index b8bfc2c06f..897f12aea3 100644 --- a/direct/src/interval/cConstrainTransformInterval.h +++ b/direct/src/interval/cConstrainTransformInterval.h @@ -24,9 +24,9 @@ */ class EXPCL_DIRECT CConstrainTransformInterval : public CConstraintInterval { PUBLISHED: - CConstrainTransformInterval(const string &name, double duration, - const NodePath &node, const NodePath &target, - bool wrt); + explicit CConstrainTransformInterval(const string &name, double duration, + const NodePath &node, + const NodePath &target, bool wrt); INLINE const NodePath &get_node() const; INLINE const NodePath &get_target() const; diff --git a/direct/src/interval/cLerpAnimEffectInterval.h b/direct/src/interval/cLerpAnimEffectInterval.h index 8a4148baef..ef84b19df0 100644 --- a/direct/src/interval/cLerpAnimEffectInterval.h +++ b/direct/src/interval/cLerpAnimEffectInterval.h @@ -31,8 +31,8 @@ */ class EXPCL_DIRECT CLerpAnimEffectInterval : public CLerpInterval { PUBLISHED: - INLINE CLerpAnimEffectInterval(const string &name, double duration, - BlendType blend_type); + INLINE explicit CLerpAnimEffectInterval(const string &name, double duration, + BlendType blend_type); INLINE void add_control(AnimControl *control, const string &name, float begin_effect, float end_effect); diff --git a/direct/src/interval/cLerpNodePathInterval.h b/direct/src/interval/cLerpNodePathInterval.h index 06b09deb3b..9ac5ae46dc 100644 --- a/direct/src/interval/cLerpNodePathInterval.h +++ b/direct/src/interval/cLerpNodePathInterval.h @@ -25,10 +25,10 @@ */ class EXPCL_DIRECT CLerpNodePathInterval : public CLerpInterval { PUBLISHED: - CLerpNodePathInterval(const string &name, double duration, - BlendType blend_type, bool bake_in_start, - bool fluid, - const NodePath &node, const NodePath &other); + explicit CLerpNodePathInterval(const string &name, double duration, + BlendType blend_type, bool bake_in_start, + bool fluid, + const NodePath &node, const NodePath &other); INLINE const NodePath &get_node() const; INLINE const NodePath &get_other() const; diff --git a/direct/src/interval/cMetaInterval.h b/direct/src/interval/cMetaInterval.h index 4f4e246045..ea44225842 100644 --- a/direct/src/interval/cMetaInterval.h +++ b/direct/src/interval/cMetaInterval.h @@ -31,7 +31,7 @@ */ class EXPCL_DIRECT CMetaInterval : public CInterval { PUBLISHED: - CMetaInterval(const string &name); + explicit CMetaInterval(const string &name); virtual ~CMetaInterval(); enum RelativeStart { diff --git a/direct/src/interval/hideInterval.h b/direct/src/interval/hideInterval.h index 6b57ef7237..f2a53307b1 100644 --- a/direct/src/interval/hideInterval.h +++ b/direct/src/interval/hideInterval.h @@ -23,7 +23,7 @@ */ class EXPCL_DIRECT HideInterval : public CInterval { PUBLISHED: - HideInterval(const NodePath &node, const string &name = string()); + explicit HideInterval(const NodePath &node, const string &name = string()); virtual void priv_instant(); virtual void priv_reverse_instant(); diff --git a/direct/src/interval/showInterval.h b/direct/src/interval/showInterval.h index 3ed7d55649..5365581339 100644 --- a/direct/src/interval/showInterval.h +++ b/direct/src/interval/showInterval.h @@ -23,7 +23,7 @@ */ class EXPCL_DIRECT ShowInterval : public CInterval { PUBLISHED: - ShowInterval(const NodePath &node, const string &name = string()); + explicit ShowInterval(const NodePath &node, const string &name = string()); virtual void priv_instant(); virtual void priv_reverse_instant(); diff --git a/direct/src/interval/waitInterval.h b/direct/src/interval/waitInterval.h index a1fd57793b..dbf0757843 100644 --- a/direct/src/interval/waitInterval.h +++ b/direct/src/interval/waitInterval.h @@ -23,7 +23,7 @@ */ class EXPCL_DIRECT WaitInterval : public CInterval { PUBLISHED: - INLINE WaitInterval(double duration); + INLINE explicit WaitInterval(double duration); virtual void priv_step(double t); diff --git a/dtool/src/dtoolutil/pandaFileStream.h b/dtool/src/dtoolutil/pandaFileStream.h index bd943bd11a..f5c7e6f766 100644 --- a/dtool/src/dtoolutil/pandaFileStream.h +++ b/dtool/src/dtoolutil/pandaFileStream.h @@ -29,7 +29,7 @@ class EXPCL_DTOOL IFileStream : public istream { PUBLISHED: INLINE IFileStream(); - INLINE IFileStream(const char *filename, ios::openmode mode = ios::in); + INLINE explicit IFileStream(const char *filename, ios::openmode mode = ios::in); INLINE ~IFileStream(); INLINE void open(const char *filename, ios::openmode mode = ios::in); @@ -57,7 +57,7 @@ private: class EXPCL_DTOOL OFileStream : public ostream { PUBLISHED: INLINE OFileStream(); - INLINE OFileStream(const char *filename, ios::openmode mode = ios::out); + INLINE explicit OFileStream(const char *filename, ios::openmode mode = ios::out); INLINE ~OFileStream(); INLINE void open(const char *filename, ios::openmode mode = ios::out); @@ -86,7 +86,7 @@ private: class EXPCL_DTOOL FileStream : public iostream { PUBLISHED: INLINE FileStream(); - INLINE FileStream(const char *filename, ios::openmode mode = ios::in); + INLINE explicit FileStream(const char *filename, ios::openmode mode = ios::in); INLINE ~FileStream(); INLINE void open(const char *filename, ios::openmode mode = ios::in); diff --git a/dtool/src/prc/configVariable.h b/dtool/src/prc/configVariable.h index c8adb39e65..3e42efe4d0 100644 --- a/dtool/src/prc/configVariable.h +++ b/dtool/src/prc/configVariable.h @@ -35,7 +35,7 @@ protected: const string &description, int flags); PUBLISHED: - INLINE ConfigVariable(const string &name); + INLINE explicit ConfigVariable(const string &name); INLINE ~ConfigVariable(); INLINE const string &get_string_value() const; diff --git a/dtool/src/prc/encryptStream.h b/dtool/src/prc/encryptStream.h index 3093e5d12f..a5d4972ccd 100644 --- a/dtool/src/prc/encryptStream.h +++ b/dtool/src/prc/encryptStream.h @@ -34,8 +34,8 @@ class EXPCL_DTOOLCONFIG IDecryptStream : public istream { PUBLISHED: INLINE IDecryptStream(); - INLINE IDecryptStream(istream *source, bool owns_source, - const string &password); + INLINE explicit IDecryptStream(istream *source, bool owns_source, + const string &password); #if _MSC_VER >= 1800 INLINE IDecryptStream(const IDecryptStream ©) = delete; @@ -69,8 +69,8 @@ private: class EXPCL_DTOOLCONFIG OEncryptStream : public ostream { PUBLISHED: INLINE OEncryptStream(); - INLINE OEncryptStream(ostream *dest, bool owns_dest, - const string &password); + INLINE explicit OEncryptStream(ostream *dest, bool owns_dest, + const string &password); #if _MSC_VER >= 1800 INLINE OEncryptStream(const OEncryptStream ©) = delete; diff --git a/dtool/src/prc/streamReader.h b/dtool/src/prc/streamReader.h index 1c820253c1..3d8865e21d 100644 --- a/dtool/src/prc/streamReader.h +++ b/dtool/src/prc/streamReader.h @@ -28,7 +28,7 @@ class EXPCL_DTOOLCONFIG StreamReader { public: INLINE StreamReader(istream &in); PUBLISHED: - INLINE StreamReader(istream *in, bool owns_stream); + INLINE explicit StreamReader(istream *in, bool owns_stream); INLINE StreamReader(const StreamReader ©); INLINE void operator = (const StreamReader ©); INLINE ~StreamReader(); diff --git a/dtool/src/prc/streamWrapper.h b/dtool/src/prc/streamWrapper.h index 13a564f226..856cf6f855 100644 --- a/dtool/src/prc/streamWrapper.h +++ b/dtool/src/prc/streamWrapper.h @@ -52,7 +52,7 @@ class EXPCL_DTOOLCONFIG IStreamWrapper : virtual public StreamWrapperBase { public: INLINE IStreamWrapper(istream *stream, bool owns_pointer); PUBLISHED: - INLINE IStreamWrapper(istream &stream); + INLINE explicit IStreamWrapper(istream &stream); ~IStreamWrapper(); INLINE istream *get_istream() const; @@ -79,7 +79,7 @@ class EXPCL_DTOOLCONFIG OStreamWrapper : virtual public StreamWrapperBase { public: INLINE OStreamWrapper(ostream *stream, bool owns_pointer, bool stringstream_hack = false); PUBLISHED: - INLINE OStreamWrapper(ostream &stream); + INLINE explicit OStreamWrapper(ostream &stream); ~OStreamWrapper(); INLINE ostream *get_ostream() const; @@ -115,7 +115,7 @@ class EXPCL_DTOOLCONFIG StreamWrapper : public IStreamWrapper, public OStreamWra public: INLINE StreamWrapper(iostream *stream, bool owns_pointer, bool stringstream_hack = false); PUBLISHED: - INLINE StreamWrapper(iostream &stream); + INLINE explicit StreamWrapper(iostream &stream); ~StreamWrapper(); INLINE iostream *get_iostream() const; diff --git a/dtool/src/prc/streamWriter.h b/dtool/src/prc/streamWriter.h index 2f04a9ab8d..8e2cf4dc1b 100644 --- a/dtool/src/prc/streamWriter.h +++ b/dtool/src/prc/streamWriter.h @@ -30,7 +30,7 @@ class EXPCL_DTOOLCONFIG StreamWriter { public: INLINE StreamWriter(ostream &out); PUBLISHED: - INLINE StreamWriter(ostream *out, bool owns_stream); + INLINE explicit StreamWriter(ostream *out, bool owns_stream); INLINE StreamWriter(const StreamWriter ©); INLINE void operator = (const StreamWriter ©); INLINE ~StreamWriter(); diff --git a/panda/src/audio/audioLoadRequest.h b/panda/src/audio/audioLoadRequest.h index 04b63fcb31..d70a37d5b7 100644 --- a/panda/src/audio/audioLoadRequest.h +++ b/panda/src/audio/audioLoadRequest.h @@ -32,8 +32,9 @@ public: ALLOC_DELETED_CHAIN(AudioLoadRequest); PUBLISHED: - INLINE AudioLoadRequest(AudioManager *audio_manager, const string &filename, - bool positional); + INLINE explicit AudioLoadRequest(AudioManager *audio_manager, + const string &filename, + bool positional); INLINE AudioManager *get_audio_manager() const; INLINE const string &get_filename() const; diff --git a/panda/src/bullet/bulletBaseCharacterControllerNode.h b/panda/src/bullet/bulletBaseCharacterControllerNode.h index b09b26db74..e7abe41886 100644 --- a/panda/src/bullet/bulletBaseCharacterControllerNode.h +++ b/panda/src/bullet/bulletBaseCharacterControllerNode.h @@ -27,9 +27,8 @@ * */ class EXPCL_PANDABULLET BulletBaseCharacterControllerNode : public PandaNode { - PUBLISHED: - BulletBaseCharacterControllerNode(const char *name="character"); + explicit BulletBaseCharacterControllerNode(const char *name="character"); public: virtual CollideMask get_legal_collide_mask() const; diff --git a/panda/src/bullet/bulletBoxShape.h b/panda/src/bullet/bulletBoxShape.h index 72a897d799..dcc39bc1e2 100644 --- a/panda/src/bullet/bulletBoxShape.h +++ b/panda/src/bullet/bulletBoxShape.h @@ -32,7 +32,7 @@ private: INLINE BulletBoxShape() : _shape(NULL) {}; PUBLISHED: - BulletBoxShape(const LVecBase3 &halfExtents); + explicit BulletBoxShape(const LVecBase3 &halfExtents); INLINE BulletBoxShape(const BulletBoxShape ©); INLINE void operator = (const BulletBoxShape ©); INLINE ~BulletBoxShape(); diff --git a/panda/src/bullet/bulletCapsuleShape.h b/panda/src/bullet/bulletCapsuleShape.h index b89001064f..730fdc40d3 100644 --- a/panda/src/bullet/bulletCapsuleShape.h +++ b/panda/src/bullet/bulletCapsuleShape.h @@ -24,9 +24,8 @@ * */ class EXPCL_PANDABULLET BulletCapsuleShape : public BulletShape { - PUBLISHED: - BulletCapsuleShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up=Z_up); + explicit BulletCapsuleShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up=Z_up); INLINE BulletCapsuleShape(const BulletCapsuleShape ©); INLINE void operator = (const BulletCapsuleShape ©); INLINE ~BulletCapsuleShape(); diff --git a/panda/src/bullet/bulletCharacterControllerNode.h b/panda/src/bullet/bulletCharacterControllerNode.h index 1ced97ab9d..0b8574c709 100644 --- a/panda/src/bullet/bulletCharacterControllerNode.h +++ b/panda/src/bullet/bulletCharacterControllerNode.h @@ -29,9 +29,9 @@ * */ class EXPCL_PANDABULLET BulletCharacterControllerNode : public BulletBaseCharacterControllerNode { - PUBLISHED: - BulletCharacterControllerNode(BulletShape *shape, PN_stdfloat step_height, const char *name="character"); + explicit BulletCharacterControllerNode(BulletShape *shape, PN_stdfloat step_height, + const char *name="character"); INLINE ~BulletCharacterControllerNode(); void set_linear_movement(const LVector3 &velocity, bool is_local); diff --git a/panda/src/bullet/bulletConeShape.h b/panda/src/bullet/bulletConeShape.h index 97b99b01fe..f519c5bdb2 100644 --- a/panda/src/bullet/bulletConeShape.h +++ b/panda/src/bullet/bulletConeShape.h @@ -24,9 +24,8 @@ * */ class EXPCL_PANDABULLET BulletConeShape : public BulletShape { - PUBLISHED: - BulletConeShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up=Z_up); + explicit BulletConeShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up=Z_up); INLINE BulletConeShape(const BulletConeShape ©); INLINE void operator = (const BulletConeShape ©); INLINE ~BulletConeShape(); diff --git a/panda/src/bullet/bulletConeTwistConstraint.h b/panda/src/bullet/bulletConeTwistConstraint.h index 7e5c782915..bc4f548dfb 100644 --- a/panda/src/bullet/bulletConeTwistConstraint.h +++ b/panda/src/bullet/bulletConeTwistConstraint.h @@ -30,12 +30,12 @@ class BulletRigidBodyNode; class EXPCL_PANDABULLET BulletConeTwistConstraint : public BulletConstraint { PUBLISHED: - BulletConeTwistConstraint(const BulletRigidBodyNode *node_a, - const TransformState *frame_a); - BulletConeTwistConstraint(const BulletRigidBodyNode *node_a, - const BulletRigidBodyNode *node_b, - const TransformState *frame_a, - const TransformState *frame_b); + explicit BulletConeTwistConstraint(const BulletRigidBodyNode *node_a, + const TransformState *frame_a); + explicit BulletConeTwistConstraint(const BulletRigidBodyNode *node_a, + const BulletRigidBodyNode *node_b, + const TransformState *frame_a, + const TransformState *frame_b); INLINE ~BulletConeTwistConstraint(); void set_limit(int index, PN_stdfloat value); diff --git a/panda/src/bullet/bulletConvexPointCloudShape.h b/panda/src/bullet/bulletConvexPointCloudShape.h index bb5b5d2029..db35d894eb 100644 --- a/panda/src/bullet/bulletConvexPointCloudShape.h +++ b/panda/src/bullet/bulletConvexPointCloudShape.h @@ -26,10 +26,9 @@ * */ class EXPCL_PANDABULLET BulletConvexPointCloudShape : public BulletShape { - PUBLISHED: - BulletConvexPointCloudShape(const PTA_LVecBase3 &points, LVecBase3 scale=LVecBase3(1.)); - BulletConvexPointCloudShape(const Geom *geom, LVecBase3 scale=LVecBase3(1.)); + explicit BulletConvexPointCloudShape(const PTA_LVecBase3 &points, LVecBase3 scale=LVecBase3(1.)); + explicit BulletConvexPointCloudShape(const Geom *geom, LVecBase3 scale=LVecBase3(1.)); INLINE BulletConvexPointCloudShape(const BulletConvexPointCloudShape ©); INLINE void operator = (const BulletConvexPointCloudShape ©); INLINE ~BulletConvexPointCloudShape(); diff --git a/panda/src/bullet/bulletCylinderShape.h b/panda/src/bullet/bulletCylinderShape.h index 23c8781756..934fa155dc 100644 --- a/panda/src/bullet/bulletCylinderShape.h +++ b/panda/src/bullet/bulletCylinderShape.h @@ -24,10 +24,9 @@ * */ class EXPCL_PANDABULLET BulletCylinderShape : public BulletShape { - PUBLISHED: - BulletCylinderShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up=Z_up); - BulletCylinderShape(const LVector3 &half_extents, BulletUpAxis up=Z_up); + explicit BulletCylinderShape(PN_stdfloat radius, PN_stdfloat height, BulletUpAxis up=Z_up); + explicit BulletCylinderShape(const LVector3 &half_extents, BulletUpAxis up=Z_up); INLINE BulletCylinderShape(const BulletCylinderShape ©); INLINE void operator = (const BulletCylinderShape ©); INLINE ~BulletCylinderShape(); diff --git a/panda/src/bullet/bulletDebugNode.h b/panda/src/bullet/bulletDebugNode.h index 34943865f1..dabe9d13fa 100644 --- a/panda/src/bullet/bulletDebugNode.h +++ b/panda/src/bullet/bulletDebugNode.h @@ -23,9 +23,8 @@ * */ class EXPCL_PANDABULLET BulletDebugNode : public PandaNode { - PUBLISHED: - BulletDebugNode(const char *name="debug"); + explicit BulletDebugNode(const char *name="debug"); INLINE ~BulletDebugNode(); virtual void draw_mask_changed(); diff --git a/panda/src/bullet/bulletGenericConstraint.h b/panda/src/bullet/bulletGenericConstraint.h index 523330ca0f..a2446ffcd4 100644 --- a/panda/src/bullet/bulletGenericConstraint.h +++ b/panda/src/bullet/bulletGenericConstraint.h @@ -31,16 +31,15 @@ class BulletRigidBodyNode; * */ class EXPCL_PANDABULLET BulletGenericConstraint : public BulletConstraint { - PUBLISHED: - BulletGenericConstraint(const BulletRigidBodyNode *node_a, - const TransformState *frame_a, - bool use_frame_a); - BulletGenericConstraint(const BulletRigidBodyNode *node_a, - const BulletRigidBodyNode *node_b, - const TransformState *frame_a, - const TransformState *frame_b, - bool use_frame_a); + explicit BulletGenericConstraint(const BulletRigidBodyNode *node_a, + const TransformState *frame_a, + bool use_frame_a); + explicit BulletGenericConstraint(const BulletRigidBodyNode *node_a, + const BulletRigidBodyNode *node_b, + const TransformState *frame_a, + const TransformState *frame_b, + bool use_frame_a); INLINE ~BulletGenericConstraint(); // Geometry diff --git a/panda/src/bullet/bulletGhostNode.h b/panda/src/bullet/bulletGhostNode.h index 2cf5f73f21..87a1624f3d 100644 --- a/panda/src/bullet/bulletGhostNode.h +++ b/panda/src/bullet/bulletGhostNode.h @@ -29,9 +29,8 @@ class BulletShape; * */ class EXPCL_PANDABULLET BulletGhostNode : public BulletBodyNode { - PUBLISHED: - BulletGhostNode(const char *name="ghost"); + explicit BulletGhostNode(const char *name="ghost"); INLINE ~BulletGhostNode(); // Overlapping diff --git a/panda/src/bullet/bulletHeightfieldShape.h b/panda/src/bullet/bulletHeightfieldShape.h index 0b85972564..8d7c264679 100644 --- a/panda/src/bullet/bulletHeightfieldShape.h +++ b/panda/src/bullet/bulletHeightfieldShape.h @@ -28,10 +28,9 @@ * */ class EXPCL_PANDABULLET BulletHeightfieldShape : public BulletShape { - PUBLISHED: - BulletHeightfieldShape(const PNMImage &image, PN_stdfloat max_height, BulletUpAxis up=Z_up); - BulletHeightfieldShape(Texture *tex, PN_stdfloat max_height, BulletUpAxis up=Z_up); + explicit BulletHeightfieldShape(const PNMImage &image, PN_stdfloat max_height, BulletUpAxis up=Z_up); + explicit BulletHeightfieldShape(Texture *tex, PN_stdfloat max_height, BulletUpAxis up=Z_up); INLINE BulletHeightfieldShape(const BulletHeightfieldShape ©); INLINE void operator = (const BulletHeightfieldShape ©); INLINE ~BulletHeightfieldShape(); diff --git a/panda/src/bullet/bulletHingeConstraint.h b/panda/src/bullet/bulletHingeConstraint.h index 81cf0b2674..12a1b1b2c2 100644 --- a/panda/src/bullet/bulletHingeConstraint.h +++ b/panda/src/bullet/bulletHingeConstraint.h @@ -29,28 +29,27 @@ class BulletRigidBodyNode; * adhering to specified limits. It's motor can apply angular force to them. */ class EXPCL_PANDABULLET BulletHingeConstraint : public BulletConstraint { - PUBLISHED: - BulletHingeConstraint(const BulletRigidBodyNode *node_a, - const LPoint3 &pivot_a, - const LVector3 &axis_a, - bool use_frame_a=false); - BulletHingeConstraint(const BulletRigidBodyNode *node_a, - const BulletRigidBodyNode *node_b, - const LPoint3 &pivot_a, - const LPoint3 &pivot_b, - const LVector3 &axis_a, - const LVector3 &axis_b, - bool use_frame_a=false); + explicit BulletHingeConstraint(const BulletRigidBodyNode *node_a, + const LPoint3 &pivot_a, + const LVector3 &axis_a, + bool use_frame_a=false); + explicit BulletHingeConstraint(const BulletRigidBodyNode *node_a, + const BulletRigidBodyNode *node_b, + const LPoint3 &pivot_a, + const LPoint3 &pivot_b, + const LVector3 &axis_a, + const LVector3 &axis_b, + bool use_frame_a=false); - BulletHingeConstraint(const BulletRigidBodyNode *node_a, - const TransformState *ts_a, - bool use_frame_a=false); - BulletHingeConstraint(const BulletRigidBodyNode *node_a, - const BulletRigidBodyNode *node_b, - const TransformState *ts_a, - const TransformState *ts_b, - bool use_frame_a=false); + explicit BulletHingeConstraint(const BulletRigidBodyNode *node_a, + const TransformState *ts_a, + bool use_frame_a=false); + explicit BulletHingeConstraint(const BulletRigidBodyNode *node_a, + const BulletRigidBodyNode *node_b, + const TransformState *ts_a, + const TransformState *ts_b, + bool use_frame_a=false); INLINE ~BulletHingeConstraint(); diff --git a/panda/src/bullet/bulletMinkowskiSumShape.h b/panda/src/bullet/bulletMinkowskiSumShape.h index dd148ce335..b1aa21fa45 100644 --- a/panda/src/bullet/bulletMinkowskiSumShape.h +++ b/panda/src/bullet/bulletMinkowskiSumShape.h @@ -26,9 +26,8 @@ * */ class EXPCL_PANDABULLET BulletMinkowskiSumShape : public BulletShape { - PUBLISHED: - BulletMinkowskiSumShape(const BulletShape *shape_a, const BulletShape *shape_b); + explicit BulletMinkowskiSumShape(const BulletShape *shape_a, const BulletShape *shape_b); INLINE BulletMinkowskiSumShape(const BulletMinkowskiSumShape ©); INLINE void operator = (const BulletMinkowskiSumShape ©); INLINE ~BulletMinkowskiSumShape(); diff --git a/panda/src/bullet/bulletMultiSphereShape.h b/panda/src/bullet/bulletMultiSphereShape.h index 2fb9c6c3a0..655cd070c7 100644 --- a/panda/src/bullet/bulletMultiSphereShape.h +++ b/panda/src/bullet/bulletMultiSphereShape.h @@ -26,9 +26,8 @@ * */ class EXPCL_PANDABULLET BulletMultiSphereShape : public BulletShape { - PUBLISHED: - BulletMultiSphereShape(const PTA_LVecBase3 &points, const PTA_stdfloat &radii); + explicit BulletMultiSphereShape(const PTA_LVecBase3 &points, const PTA_stdfloat &radii); INLINE BulletMultiSphereShape(const BulletMultiSphereShape ©); INLINE void operator = (const BulletMultiSphereShape ©); INLINE ~BulletMultiSphereShape(); diff --git a/panda/src/bullet/bulletPlaneShape.h b/panda/src/bullet/bulletPlaneShape.h index 4e75bfc2e6..4455328f10 100644 --- a/panda/src/bullet/bulletPlaneShape.h +++ b/panda/src/bullet/bulletPlaneShape.h @@ -32,7 +32,7 @@ private: INLINE BulletPlaneShape() : _shape(NULL) {}; PUBLISHED: - BulletPlaneShape(const LVector3 &normal, PN_stdfloat constant); + explicit BulletPlaneShape(const LVector3 &normal, PN_stdfloat constant); INLINE BulletPlaneShape(const BulletPlaneShape ©); INLINE void operator = (const BulletPlaneShape ©); INLINE ~BulletPlaneShape(); diff --git a/panda/src/bullet/bulletSliderConstraint.h b/panda/src/bullet/bulletSliderConstraint.h index 181cb3a94a..931e51ec80 100644 --- a/panda/src/bullet/bulletSliderConstraint.h +++ b/panda/src/bullet/bulletSliderConstraint.h @@ -28,16 +28,15 @@ class BulletRigidBodyNode; * */ class EXPCL_PANDABULLET BulletSliderConstraint : public BulletConstraint { - PUBLISHED: - BulletSliderConstraint(const BulletRigidBodyNode *node_a, - const TransformState *frame_a, - bool useFrame_a); - BulletSliderConstraint(const BulletRigidBodyNode *node_a, - const BulletRigidBodyNode *node_b, - const TransformState *frame_a, - const TransformState *frame_b, - bool use_frame_a); + explicit BulletSliderConstraint(const BulletRigidBodyNode *node_a, + const TransformState *frame_a, + bool useFrame_a); + explicit BulletSliderConstraint(const BulletRigidBodyNode *node_a, + const BulletRigidBodyNode *node_b, + const TransformState *frame_a, + const TransformState *frame_b, + bool use_frame_a); INLINE ~BulletSliderConstraint(); PN_stdfloat get_linear_pos() const; diff --git a/panda/src/bullet/bulletSphereShape.h b/panda/src/bullet/bulletSphereShape.h index 815728c908..ece9f8ac72 100644 --- a/panda/src/bullet/bulletSphereShape.h +++ b/panda/src/bullet/bulletSphereShape.h @@ -31,7 +31,7 @@ private: INLINE BulletSphereShape() : _shape(NULL) {}; PUBLISHED: - BulletSphereShape(PN_stdfloat radius); + explicit BulletSphereShape(PN_stdfloat radius); INLINE BulletSphereShape(const BulletSphereShape ©); INLINE void operator = (const BulletSphereShape ©); INLINE ~BulletSphereShape(); diff --git a/panda/src/bullet/bulletSphericalConstraint.h b/panda/src/bullet/bulletSphericalConstraint.h index 4aad8b4ee9..c3eb0a548d 100644 --- a/panda/src/bullet/bulletSphericalConstraint.h +++ b/panda/src/bullet/bulletSphericalConstraint.h @@ -32,14 +32,13 @@ class BulletRigidBodyNode; * socket" joint. */ class EXPCL_PANDABULLET BulletSphericalConstraint : public BulletConstraint { - PUBLISHED: - BulletSphericalConstraint(const BulletRigidBodyNode *node_a, - const LPoint3 &pivot_a); - BulletSphericalConstraint(const BulletRigidBodyNode *node_a, - const BulletRigidBodyNode *node_b, - const LPoint3 &pivot_a, - const LPoint3 &pivot_b); + explicit BulletSphericalConstraint(const BulletRigidBodyNode *node_a, + const LPoint3 &pivot_a); + explicit BulletSphericalConstraint(const BulletRigidBodyNode *node_a, + const BulletRigidBodyNode *node_b, + const LPoint3 &pivot_a, + const LPoint3 &pivot_b); INLINE ~BulletSphericalConstraint(); // Pivots diff --git a/panda/src/bullet/bulletTriangleMeshShape.h b/panda/src/bullet/bulletTriangleMeshShape.h index 022df31655..216cf2bc5c 100644 --- a/panda/src/bullet/bulletTriangleMeshShape.h +++ b/panda/src/bullet/bulletTriangleMeshShape.h @@ -31,7 +31,7 @@ private: INLINE BulletTriangleMeshShape(); PUBLISHED: - BulletTriangleMeshShape(BulletTriangleMesh *mesh, bool dynamic, bool compress=true, bool bvh=true); + explicit BulletTriangleMeshShape(BulletTriangleMesh *mesh, bool dynamic, bool compress=true, bool bvh=true); INLINE BulletTriangleMeshShape(const BulletTriangleMeshShape ©); INLINE void operator = (const BulletTriangleMeshShape ©); INLINE ~BulletTriangleMeshShape(); diff --git a/panda/src/chan/animBundle.h b/panda/src/chan/animBundle.h index 2bcaec1896..799d262ab8 100644 --- a/panda/src/chan/animBundle.h +++ b/panda/src/chan/animBundle.h @@ -31,7 +31,7 @@ protected: AnimBundle(AnimGroup *parent, const AnimBundle ©); PUBLISHED: - INLINE AnimBundle(const string &name, PN_stdfloat fps, int num_frames); + INLINE explicit AnimBundle(const string &name, PN_stdfloat fps, int num_frames); PT(AnimBundle) copy_bundle() const; diff --git a/panda/src/chan/animBundleNode.h b/panda/src/chan/animBundleNode.h index cb6f577a4c..38df110191 100644 --- a/panda/src/chan/animBundleNode.h +++ b/panda/src/chan/animBundleNode.h @@ -28,7 +28,7 @@ */ class EXPCL_PANDA_CHAN AnimBundleNode : public PandaNode { PUBLISHED: - INLINE AnimBundleNode(const string &name, AnimBundle *bundle); + INLINE explicit AnimBundleNode(const string &name, AnimBundle *bundle); protected: INLINE AnimBundleNode(); diff --git a/panda/src/chan/animChannelMatrixXfmTable.h b/panda/src/chan/animChannelMatrixXfmTable.h index 431d3ef18f..e3a81a7b2a 100644 --- a/panda/src/chan/animChannelMatrixXfmTable.h +++ b/panda/src/chan/animChannelMatrixXfmTable.h @@ -34,7 +34,7 @@ protected: AnimChannelMatrixXfmTable(AnimGroup *parent, const AnimChannelMatrixXfmTable ©); PUBLISHED: - AnimChannelMatrixXfmTable(AnimGroup *parent, const string &name); + explicit AnimChannelMatrixXfmTable(AnimGroup *parent, const string &name); virtual ~AnimChannelMatrixXfmTable(); public: diff --git a/panda/src/chan/animGroup.h b/panda/src/chan/animGroup.h index 22b1366c84..a58c1aff5d 100644 --- a/panda/src/chan/animGroup.h +++ b/panda/src/chan/animGroup.h @@ -37,7 +37,7 @@ protected: PUBLISHED: // This is the normal AnimGroup constructor. - AnimGroup(AnimGroup *parent, const string &name); + explicit AnimGroup(AnimGroup *parent, const string &name); virtual ~AnimGroup(); int get_num_children() const; diff --git a/panda/src/chan/bindAnimRequest.h b/panda/src/chan/bindAnimRequest.h index afb57d46cd..fed5e5d596 100644 --- a/panda/src/chan/bindAnimRequest.h +++ b/panda/src/chan/bindAnimRequest.h @@ -30,13 +30,13 @@ public: ALLOC_DELETED_CHAIN(BindAnimRequest); PUBLISHED: - BindAnimRequest(const string &name, - const Filename &filename, - const LoaderOptions &options, - Loader *loader, - AnimControl *control, - int hierarchy_match_flags, - const PartSubset &subset); + explicit BindAnimRequest(const string &name, + const Filename &filename, + const LoaderOptions &options, + Loader *loader, + AnimControl *control, + int hierarchy_match_flags, + const PartSubset &subset); protected: virtual DoneStatus do_task(); diff --git a/panda/src/chan/partBundle.h b/panda/src/chan/partBundle.h index 0d22fe5e73..60d2b66b8b 100644 --- a/panda/src/chan/partBundle.h +++ b/panda/src/chan/partBundle.h @@ -55,7 +55,7 @@ protected: PartBundle(const PartBundle ©); PUBLISHED: - PartBundle(const string &name = ""); + explicit PartBundle(const string &name = ""); virtual PartGroup *make_copy() const; INLINE CPT(AnimPreloadTable) get_anim_preload() const; diff --git a/panda/src/chan/partBundleNode.h b/panda/src/chan/partBundleNode.h index f4cafaf056..231c1175ee 100644 --- a/panda/src/chan/partBundleNode.h +++ b/panda/src/chan/partBundleNode.h @@ -34,7 +34,7 @@ */ class EXPCL_PANDA_CHAN PartBundleNode : public PandaNode { PUBLISHED: - INLINE PartBundleNode(const string &name, PartBundle *bundle); + INLINE explicit PartBundleNode(const string &name, PartBundle *bundle); protected: INLINE PartBundleNode(); diff --git a/panda/src/chan/partGroup.h b/panda/src/chan/partGroup.h index 5265846c19..50025a9eb9 100644 --- a/panda/src/chan/partGroup.h +++ b/panda/src/chan/partGroup.h @@ -60,7 +60,7 @@ protected: PUBLISHED: // This is the normal PartGroup constructor. - PartGroup(PartGroup *parent, const string &name); + explicit PartGroup(PartGroup *parent, const string &name); virtual ~PartGroup(); virtual bool is_character_joint() const; diff --git a/panda/src/char/character.h b/panda/src/char/character.h index ca040d586b..1903d39ab8 100644 --- a/panda/src/char/character.h +++ b/panda/src/char/character.h @@ -41,7 +41,7 @@ protected: Character(const Character ©, bool copy_bundles); PUBLISHED: - Character(const string &name); + explicit Character(const string &name); virtual ~Character(); public: diff --git a/panda/src/char/characterJoint.h b/panda/src/char/characterJoint.h index 10f73a22a3..759d175c7e 100644 --- a/panda/src/char/characterJoint.h +++ b/panda/src/char/characterJoint.h @@ -35,9 +35,9 @@ protected: CharacterJoint(const CharacterJoint ©); PUBLISHED: - CharacterJoint(Character *character, - PartBundle *root, PartGroup *parent, const string &name, - const LMatrix4 &default_value); + explicit CharacterJoint(Character *character, PartBundle *root, + PartGroup *parent, const string &name, + const LMatrix4 &default_value); virtual ~CharacterJoint(); public: diff --git a/panda/src/char/characterJointBundle.h b/panda/src/char/characterJointBundle.h index fead649eb0..4c68fb9b3d 100644 --- a/panda/src/char/characterJointBundle.h +++ b/panda/src/char/characterJointBundle.h @@ -30,7 +30,7 @@ protected: INLINE CharacterJointBundle(const CharacterJointBundle ©); PUBLISHED: - CharacterJointBundle(const string &name = ""); + explicit CharacterJointBundle(const string &name = ""); virtual ~CharacterJointBundle(); PUBLISHED: diff --git a/panda/src/char/characterSlider.h b/panda/src/char/characterSlider.h index fe5129bca4..fe7e38945e 100644 --- a/panda/src/char/characterSlider.h +++ b/panda/src/char/characterSlider.h @@ -31,7 +31,7 @@ protected: CharacterSlider(const CharacterSlider ©); PUBLISHED: - CharacterSlider(PartGroup *parent, const string &name); + explicit CharacterSlider(PartGroup *parent, const string &name); virtual ~CharacterSlider(); virtual PartGroup *make_copy() const; diff --git a/panda/src/collide/collisionBox.h b/panda/src/collide/collisionBox.h index 8a8cd3d0be..c5bb22be88 100644 --- a/panda/src/collide/collisionBox.h +++ b/panda/src/collide/collisionBox.h @@ -26,9 +26,9 @@ */ class EXPCL_PANDA_COLLIDE CollisionBox : public CollisionSolid { PUBLISHED: - INLINE CollisionBox(const LPoint3 ¢er, - PN_stdfloat x, PN_stdfloat y, PN_stdfloat z); - INLINE CollisionBox(const LPoint3 &min, const LPoint3 &max); + INLINE explicit CollisionBox(const LPoint3 ¢er, + PN_stdfloat x, PN_stdfloat y, PN_stdfloat z); + INLINE explicit CollisionBox(const LPoint3 &min, const LPoint3 &max); virtual LPoint3 get_collision_origin() const; diff --git a/panda/src/collide/collisionInvSphere.h b/panda/src/collide/collisionInvSphere.h index bdf08f9009..ffc9628a5b 100644 --- a/panda/src/collide/collisionInvSphere.h +++ b/panda/src/collide/collisionInvSphere.h @@ -26,8 +26,8 @@ */ class EXPCL_PANDA_COLLIDE CollisionInvSphere : public CollisionSphere { PUBLISHED: - INLINE CollisionInvSphere(const LPoint3 ¢er, PN_stdfloat radius); - INLINE CollisionInvSphere(PN_stdfloat cx, PN_stdfloat cy, PN_stdfloat cz, PN_stdfloat radius); + INLINE explicit CollisionInvSphere(const LPoint3 ¢er, PN_stdfloat radius); + INLINE explicit CollisionInvSphere(PN_stdfloat cx, PN_stdfloat cy, PN_stdfloat cz, PN_stdfloat radius); protected: INLINE CollisionInvSphere(); diff --git a/panda/src/collide/collisionLine.h b/panda/src/collide/collisionLine.h index 7d08521ef4..71904192de 100644 --- a/panda/src/collide/collisionLine.h +++ b/panda/src/collide/collisionLine.h @@ -25,9 +25,9 @@ class EXPCL_PANDA_COLLIDE CollisionLine : public CollisionRay { PUBLISHED: INLINE CollisionLine(); - INLINE CollisionLine(const LPoint3 &origin, const LVector3 &direction); - INLINE CollisionLine(PN_stdfloat ox, PN_stdfloat oy, PN_stdfloat oz, - PN_stdfloat dx, PN_stdfloat dy, PN_stdfloat dz); + INLINE explicit CollisionLine(const LPoint3 &origin, const LVector3 &direction); + INLINE explicit CollisionLine(PN_stdfloat ox, PN_stdfloat oy, PN_stdfloat oz, + PN_stdfloat dx, PN_stdfloat dy, PN_stdfloat dz); public: INLINE CollisionLine(const CollisionLine ©); diff --git a/panda/src/collide/collisionNode.h b/panda/src/collide/collisionNode.h index 82c40a4d12..c350888acd 100644 --- a/panda/src/collide/collisionNode.h +++ b/panda/src/collide/collisionNode.h @@ -29,7 +29,7 @@ */ class EXPCL_PANDA_COLLIDE CollisionNode : public PandaNode { PUBLISHED: - CollisionNode(const string &name); + explicit CollisionNode(const string &name); protected: CollisionNode(const CollisionNode ©); diff --git a/panda/src/collide/collisionParabola.h b/panda/src/collide/collisionParabola.h index 5d6cdedb89..2f72518ac4 100644 --- a/panda/src/collide/collisionParabola.h +++ b/panda/src/collide/collisionParabola.h @@ -32,7 +32,7 @@ class LensNode; class EXPCL_PANDA_COLLIDE CollisionParabola : public CollisionSolid { PUBLISHED: INLINE CollisionParabola(); - INLINE CollisionParabola(const LParabola ¶bola, PN_stdfloat t1, PN_stdfloat t2); + INLINE explicit CollisionParabola(const LParabola ¶bola, PN_stdfloat t1, PN_stdfloat t2); virtual LPoint3 get_collision_origin() const; diff --git a/panda/src/collide/collisionRay.h b/panda/src/collide/collisionRay.h index 515ed7347d..d317761906 100644 --- a/panda/src/collide/collisionRay.h +++ b/panda/src/collide/collisionRay.h @@ -27,9 +27,9 @@ class EXPCL_PANDA_COLLIDE CollisionRay : public CollisionSolid { PUBLISHED: INLINE CollisionRay(); - INLINE CollisionRay(const LPoint3 &origin, const LVector3 &direction); - INLINE CollisionRay(PN_stdfloat ox, PN_stdfloat oy, PN_stdfloat oz, - PN_stdfloat dx, PN_stdfloat dy, PN_stdfloat dz); + INLINE explicit CollisionRay(const LPoint3 &origin, const LVector3 &direction); + INLINE explicit CollisionRay(PN_stdfloat ox, PN_stdfloat oy, PN_stdfloat oz, + PN_stdfloat dx, PN_stdfloat dy, PN_stdfloat dz); virtual LPoint3 get_collision_origin() const; diff --git a/panda/src/collide/collisionSegment.h b/panda/src/collide/collisionSegment.h index e2e00b14e5..429eff426d 100644 --- a/panda/src/collide/collisionSegment.h +++ b/panda/src/collide/collisionSegment.h @@ -31,9 +31,9 @@ class LensNode; class EXPCL_PANDA_COLLIDE CollisionSegment : public CollisionSolid { PUBLISHED: INLINE CollisionSegment(); - INLINE CollisionSegment(const LPoint3 &a, const LPoint3 &db); - INLINE CollisionSegment(PN_stdfloat ax, PN_stdfloat ay, PN_stdfloat az, - PN_stdfloat bx, PN_stdfloat by, PN_stdfloat bz); + INLINE explicit CollisionSegment(const LPoint3 &a, const LPoint3 &db); + INLINE explicit CollisionSegment(PN_stdfloat ax, PN_stdfloat ay, PN_stdfloat az, + PN_stdfloat bx, PN_stdfloat by, PN_stdfloat bz); virtual LPoint3 get_collision_origin() const; diff --git a/panda/src/collide/collisionSphere.h b/panda/src/collide/collisionSphere.h index f6cb45d804..04fa9c4e83 100644 --- a/panda/src/collide/collisionSphere.h +++ b/panda/src/collide/collisionSphere.h @@ -24,8 +24,8 @@ */ class EXPCL_PANDA_COLLIDE CollisionSphere : public CollisionSolid { PUBLISHED: - INLINE CollisionSphere(const LPoint3 ¢er, PN_stdfloat radius); - INLINE CollisionSphere(PN_stdfloat cx, PN_stdfloat cy, PN_stdfloat cz, PN_stdfloat radius); + INLINE explicit CollisionSphere(const LPoint3 ¢er, PN_stdfloat radius); + INLINE explicit CollisionSphere(PN_stdfloat cx, PN_stdfloat cy, PN_stdfloat cz, PN_stdfloat radius); virtual LPoint3 get_collision_origin() const; diff --git a/panda/src/collide/collisionTraverser.h b/panda/src/collide/collisionTraverser.h index d4f2b2a24b..8aaa0fd475 100644 --- a/panda/src/collide/collisionTraverser.h +++ b/panda/src/collide/collisionTraverser.h @@ -44,7 +44,7 @@ class CollisionEntry; */ class EXPCL_PANDA_COLLIDE CollisionTraverser : public Namable { PUBLISHED: - CollisionTraverser(const string &name = "ctrav"); + explicit CollisionTraverser(const string &name = "ctrav"); ~CollisionTraverser(); INLINE void set_respect_prev_transform(bool flag); diff --git a/panda/src/collide/collisionTube.h b/panda/src/collide/collisionTube.h index fe6a57c981..52701193eb 100644 --- a/panda/src/collide/collisionTube.h +++ b/panda/src/collide/collisionTube.h @@ -25,11 +25,11 @@ */ class EXPCL_PANDA_COLLIDE CollisionTube : public CollisionSolid { PUBLISHED: - INLINE CollisionTube(const LPoint3 &a, const LPoint3 &db, - PN_stdfloat radius); - INLINE CollisionTube(PN_stdfloat ax, PN_stdfloat ay, PN_stdfloat az, - PN_stdfloat bx, PN_stdfloat by, PN_stdfloat bz, - PN_stdfloat radius); + INLINE explicit CollisionTube(const LPoint3 &a, const LPoint3 &db, + PN_stdfloat radius); + INLINE explicit CollisionTube(PN_stdfloat ax, PN_stdfloat ay, PN_stdfloat az, + PN_stdfloat bx, PN_stdfloat by, PN_stdfloat bz, + PN_stdfloat radius); virtual LPoint3 get_collision_origin() const; diff --git a/panda/src/collide/collisionVisualizer.h b/panda/src/collide/collisionVisualizer.h index 27c2d257a4..29d920f92d 100644 --- a/panda/src/collide/collisionVisualizer.h +++ b/panda/src/collide/collisionVisualizer.h @@ -33,7 +33,7 @@ */ class EXPCL_PANDA_COLLIDE CollisionVisualizer : public PandaNode, public CollisionRecorder { PUBLISHED: - CollisionVisualizer(const string &name); + explicit CollisionVisualizer(const string &name); virtual ~CollisionVisualizer(); INLINE void set_point_scale(PN_stdfloat point_scale); diff --git a/panda/src/device/analogNode.h b/panda/src/device/analogNode.h index 862277e90b..d62eaa0d3b 100644 --- a/panda/src/device/analogNode.h +++ b/panda/src/device/analogNode.h @@ -38,7 +38,7 @@ */ class EXPCL_PANDA_DEVICE AnalogNode : public DataNode { PUBLISHED: - AnalogNode(ClientBase *client, const string &device_name); + explicit AnalogNode(ClientBase *client, const string &device_name); virtual ~AnalogNode(); INLINE bool is_valid() const; diff --git a/panda/src/device/buttonNode.h b/panda/src/device/buttonNode.h index 4399151d4f..6fce65a9e0 100644 --- a/panda/src/device/buttonNode.h +++ b/panda/src/device/buttonNode.h @@ -34,7 +34,7 @@ */ class EXPCL_PANDA_DEVICE ButtonNode : public DataNode { PUBLISHED: - ButtonNode(ClientBase *client, const string &device_name); + explicit ButtonNode(ClientBase *client, const string &device_name); virtual ~ButtonNode(); INLINE bool is_valid() const; diff --git a/panda/src/device/dialNode.h b/panda/src/device/dialNode.h index 04c65b1050..13e2083efc 100644 --- a/panda/src/device/dialNode.h +++ b/panda/src/device/dialNode.h @@ -33,7 +33,7 @@ */ class EXPCL_PANDA_DEVICE DialNode : public DataNode { PUBLISHED: - DialNode(ClientBase *client, const string &device_name); + explicit DialNode(ClientBase *client, const string &device_name); virtual ~DialNode(); INLINE bool is_valid() const; diff --git a/panda/src/device/mouseAndKeyboard.h b/panda/src/device/mouseAndKeyboard.h index 673e999da2..24a6efe07a 100644 --- a/panda/src/device/mouseAndKeyboard.h +++ b/panda/src/device/mouseAndKeyboard.h @@ -40,7 +40,7 @@ */ class EXPCL_PANDA_DEVICE MouseAndKeyboard : public DataNode { PUBLISHED: - MouseAndKeyboard(GraphicsWindow *window, int device, const string &name); + explicit MouseAndKeyboard(GraphicsWindow *window, int device, const string &name); void set_source(GraphicsWindow *window, int device); PT(GraphicsWindow) get_source_window() const; diff --git a/panda/src/device/trackerNode.h b/panda/src/device/trackerNode.h index 3c18f65294..628422324b 100644 --- a/panda/src/device/trackerNode.h +++ b/panda/src/device/trackerNode.h @@ -31,8 +31,8 @@ */ class EXPCL_PANDA_DEVICE TrackerNode : public DataNode { PUBLISHED: - TrackerNode(ClientBase *client, const string &device_name); - TrackerNode(ClientTrackerDevice *device); + explicit TrackerNode(ClientBase *client, const string &device_name); + explicit TrackerNode(ClientTrackerDevice *device); virtual ~TrackerNode(); INLINE bool is_valid() const; diff --git a/panda/src/device/virtualMouse.h b/panda/src/device/virtualMouse.h index 885d3a883c..037180305d 100644 --- a/panda/src/device/virtualMouse.h +++ b/panda/src/device/virtualMouse.h @@ -31,7 +31,7 @@ */ class EXPCL_PANDA_DEVICE VirtualMouse : public DataNode { PUBLISHED: - VirtualMouse(const string &name); + explicit VirtualMouse(const string &name); void set_mouse_pos(int x, int y); void set_window_size(int width, int height); diff --git a/panda/src/dgraph/dataGraphTraverser.h b/panda/src/dgraph/dataGraphTraverser.h index 291958cbca..aa7037894a 100644 --- a/panda/src/dgraph/dataGraphTraverser.h +++ b/panda/src/dgraph/dataGraphTraverser.h @@ -31,7 +31,7 @@ class PandaNode; */ class EXPCL_PANDA_DGRAPH DataGraphTraverser { PUBLISHED: - DataGraphTraverser(Thread *current_thread = Thread::get_current_thread()); + explicit DataGraphTraverser(Thread *current_thread = Thread::get_current_thread()); ~DataGraphTraverser(); INLINE Thread *get_current_thread() const; diff --git a/panda/src/dgraph/dataNode.h b/panda/src/dgraph/dataNode.h index 0519cc5fdd..0f5e52b0fc 100644 --- a/panda/src/dgraph/dataNode.h +++ b/panda/src/dgraph/dataNode.h @@ -51,7 +51,7 @@ class DataNodeTransmit; */ class EXPCL_PANDA_DGRAPH DataNode : public PandaNode { PUBLISHED: - INLINE DataNode(const string &name); + INLINE explicit DataNode(const string &name); protected: INLINE DataNode(const DataNode ©); diff --git a/panda/src/display/graphicsEngine.h b/panda/src/display/graphicsEngine.h index 1483fca068..d18d86f690 100644 --- a/panda/src/display/graphicsEngine.h +++ b/panda/src/display/graphicsEngine.h @@ -52,7 +52,7 @@ class Texture; */ class EXPCL_PANDA_DISPLAY GraphicsEngine : public ReferenceCount { PUBLISHED: - GraphicsEngine(Pipeline *pipeline = NULL); + explicit GraphicsEngine(Pipeline *pipeline = NULL); BLOCKING ~GraphicsEngine(); void set_threading_model(const GraphicsThreadingModel &threading_model); diff --git a/panda/src/distort/projectionScreen.h b/panda/src/distort/projectionScreen.h index 963e38370a..86f9484379 100644 --- a/panda/src/distort/projectionScreen.h +++ b/panda/src/distort/projectionScreen.h @@ -47,7 +47,7 @@ class WorkingNodePath; */ class EXPCL_PANDAFX ProjectionScreen : public PandaNode { PUBLISHED: - ProjectionScreen(const string &name = ""); + explicit ProjectionScreen(const string &name = ""); virtual ~ProjectionScreen(); protected: diff --git a/panda/src/downloader/downloadDb.h b/panda/src/downloader/downloadDb.h index e1605f6295..02adedb3d6 100644 --- a/panda/src/downloader/downloadDb.h +++ b/panda/src/downloader/downloadDb.h @@ -72,8 +72,8 @@ PUBLISHED: }; DownloadDb(); - DownloadDb(Ramfile &server_file, Filename &client_file); - DownloadDb(Filename &server_file, Filename &client_file); + explicit DownloadDb(Ramfile &server_file, Filename &client_file); + explicit DownloadDb(Filename &server_file, Filename &client_file); ~DownloadDb(); void output(ostream &out) const; diff --git a/panda/src/downloader/httpCookie.h b/panda/src/downloader/httpCookie.h index 5a458f9af2..af460ec3c2 100644 --- a/panda/src/downloader/httpCookie.h +++ b/panda/src/downloader/httpCookie.h @@ -32,8 +32,9 @@ class EXPCL_PANDAEXPRESS HTTPCookie { PUBLISHED: INLINE HTTPCookie(); - INLINE HTTPCookie(const string &format, const URLSpec &url); - INLINE HTTPCookie(const string &name, const string &path, const string &domain); + INLINE explicit HTTPCookie(const string &format, const URLSpec &url); + INLINE explicit HTTPCookie(const string &name, const string &path, + const string &domain); INLINE ~HTTPCookie(); INLINE void set_name(const string &name); diff --git a/panda/src/downloader/patcher.h b/panda/src/downloader/patcher.h index a480f079bb..bf4ffdd351 100644 --- a/panda/src/downloader/patcher.h +++ b/panda/src/downloader/patcher.h @@ -28,7 +28,7 @@ class EXPCL_PANDAEXPRESS Patcher { PUBLISHED: Patcher(); - Patcher(PT(Buffer) buffer); + explicit Patcher(PT(Buffer) buffer); virtual ~Patcher(); int initiate(Filename &patch, Filename &infile); diff --git a/panda/src/downloader/virtualFileMountHTTP.h b/panda/src/downloader/virtualFileMountHTTP.h index 0759d35fdd..996905a913 100644 --- a/panda/src/downloader/virtualFileMountHTTP.h +++ b/panda/src/downloader/virtualFileMountHTTP.h @@ -30,7 +30,7 @@ */ class EXPCL_PANDAEXPRESS VirtualFileMountHTTP : public VirtualFileMount { PUBLISHED: - VirtualFileMountHTTP(const URLSpec &root, HTTPClient *http = HTTPClient::get_global_ptr()); + explicit VirtualFileMountHTTP(const URLSpec &root, HTTPClient *http = HTTPClient::get_global_ptr()); virtual ~VirtualFileMountHTTP(); INLINE HTTPClient *get_http_client() const; diff --git a/panda/src/egg/eggAnimData.h b/panda/src/egg/eggAnimData.h index 745f98595b..1548f3f0b7 100644 --- a/panda/src/egg/eggAnimData.h +++ b/panda/src/egg/eggAnimData.h @@ -29,8 +29,7 @@ */ class EXPCL_PANDAEGG EggAnimData : public EggNode { PUBLISHED: - - INLINE EggAnimData(const string &name = ""); + INLINE explicit EggAnimData(const string &name = ""); INLINE EggAnimData(const EggAnimData ©); INLINE EggAnimData &operator = (const EggAnimData ©); diff --git a/panda/src/egg/eggAnimPreload.h b/panda/src/egg/eggAnimPreload.h index 10374caf9f..9dc2352e5f 100644 --- a/panda/src/egg/eggAnimPreload.h +++ b/panda/src/egg/eggAnimPreload.h @@ -23,7 +23,7 @@ */ class EXPCL_PANDAEGG EggAnimPreload : public EggNode { PUBLISHED: - INLINE EggAnimPreload(const string &name = ""); + INLINE explicit EggAnimPreload(const string &name = ""); INLINE EggAnimPreload(const EggAnimPreload ©); INLINE EggAnimPreload &operator = (const EggAnimPreload ©); diff --git a/panda/src/egg/eggBin.h b/panda/src/egg/eggBin.h index 7ea017d8c6..3553f467fb 100644 --- a/panda/src/egg/eggBin.h +++ b/panda/src/egg/eggBin.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDAEGG EggBin : public EggGroup { PUBLISHED: - EggBin(const string &name = ""); + explicit EggBin(const string &name = ""); EggBin(const EggGroup ©); EggBin(const EggBin ©); diff --git a/panda/src/egg/eggComment.h b/panda/src/egg/eggComment.h index d0b7632876..63d5eb82d8 100644 --- a/panda/src/egg/eggComment.h +++ b/panda/src/egg/eggComment.h @@ -23,7 +23,7 @@ */ class EXPCL_PANDAEGG EggComment : public EggNode { PUBLISHED: - INLINE EggComment(const string &node_name, const string &comment); + INLINE explicit EggComment(const string &node_name, const string &comment); INLINE EggComment(const EggComment ©); // You can use the string operators to directly set and manipulate the diff --git a/panda/src/egg/eggCompositePrimitive.h b/panda/src/egg/eggCompositePrimitive.h index b816d816c7..e6911ea3bc 100644 --- a/panda/src/egg/eggCompositePrimitive.h +++ b/panda/src/egg/eggCompositePrimitive.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDAEGG EggCompositePrimitive : public EggPrimitive { PUBLISHED: - INLINE EggCompositePrimitive(const string &name = ""); + INLINE explicit EggCompositePrimitive(const string &name = ""); INLINE EggCompositePrimitive(const EggCompositePrimitive ©); INLINE EggCompositePrimitive &operator = (const EggCompositePrimitive ©); virtual ~EggCompositePrimitive(); diff --git a/panda/src/egg/eggCurve.h b/panda/src/egg/eggCurve.h index fa43f9700a..6ea17bc77a 100644 --- a/panda/src/egg/eggCurve.h +++ b/panda/src/egg/eggCurve.h @@ -23,7 +23,7 @@ */ class EXPCL_PANDAEGG EggCurve : public EggPrimitive { PUBLISHED: - INLINE EggCurve(const string &name = ""); + INLINE explicit EggCurve(const string &name = ""); INLINE EggCurve(const EggCurve ©); INLINE EggCurve &operator = (const EggCurve ©); diff --git a/panda/src/egg/eggExternalReference.h b/panda/src/egg/eggExternalReference.h index 48ea165b9b..799c794bd1 100644 --- a/panda/src/egg/eggExternalReference.h +++ b/panda/src/egg/eggExternalReference.h @@ -24,7 +24,7 @@ */ class EXPCL_PANDAEGG EggExternalReference : public EggFilenameNode { PUBLISHED: - EggExternalReference(const string &node_name, const string &filename); + explicit EggExternalReference(const string &node_name, const string &filename); EggExternalReference(const EggExternalReference ©); EggExternalReference &operator = (const EggExternalReference ©); diff --git a/panda/src/egg/eggFilenameNode.h b/panda/src/egg/eggFilenameNode.h index d4ac734ce7..46734f6a24 100644 --- a/panda/src/egg/eggFilenameNode.h +++ b/panda/src/egg/eggFilenameNode.h @@ -27,7 +27,7 @@ class EXPCL_PANDAEGG EggFilenameNode : public EggNode { PUBLISHED: INLINE EggFilenameNode(); - INLINE EggFilenameNode(const string &node_name, const Filename &filename); + INLINE explicit EggFilenameNode(const string &node_name, const Filename &filename); INLINE EggFilenameNode(const EggFilenameNode ©); INLINE EggFilenameNode &operator = (const EggFilenameNode ©); diff --git a/panda/src/egg/eggGroup.h b/panda/src/egg/eggGroup.h index 69d72807a9..1266e42a49 100644 --- a/panda/src/egg/eggGroup.h +++ b/panda/src/egg/eggGroup.h @@ -132,7 +132,7 @@ PUBLISHED: BO_one_minus_alpha_scale, }; - EggGroup(const string &name = ""); + explicit EggGroup(const string &name = ""); EggGroup(const EggGroup ©); EggGroup &operator = (const EggGroup ©); ~EggGroup(); diff --git a/panda/src/egg/eggGroupNode.h b/panda/src/egg/eggGroupNode.h index 62dda7dd12..85956cd32b 100644 --- a/panda/src/egg/eggGroupNode.h +++ b/panda/src/egg/eggGroupNode.h @@ -58,7 +58,7 @@ private: // Here begins the actual public interface to EggGroupNode. PUBLISHED: - EggGroupNode(const string &name = "") : EggNode(name) { } + explicit EggGroupNode(const string &name = "") : EggNode(name) { } EggGroupNode(const EggGroupNode ©); EggGroupNode &operator = (const EggGroupNode ©); virtual ~EggGroupNode(); diff --git a/panda/src/egg/eggGroupUniquifier.h b/panda/src/egg/eggGroupUniquifier.h index 97c3a12226..af9e3b8f77 100644 --- a/panda/src/egg/eggGroupUniquifier.h +++ b/panda/src/egg/eggGroupUniquifier.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDAEGG EggGroupUniquifier : public EggNameUniquifier { PUBLISHED: - EggGroupUniquifier(bool filter_names = true); + explicit EggGroupUniquifier(bool filter_names = true); virtual string get_category(EggNode *node); virtual string filter_name(EggNode *node); diff --git a/panda/src/egg/eggLine.h b/panda/src/egg/eggLine.h index 27ee84a785..4e5eef098c 100644 --- a/panda/src/egg/eggLine.h +++ b/panda/src/egg/eggLine.h @@ -24,7 +24,7 @@ */ class EXPCL_PANDAEGG EggLine : public EggCompositePrimitive { PUBLISHED: - INLINE EggLine(const string &name = ""); + INLINE explicit EggLine(const string &name = ""); INLINE EggLine(const EggLine ©); INLINE EggLine &operator = (const EggLine ©); virtual ~EggLine(); diff --git a/panda/src/egg/eggMaterial.h b/panda/src/egg/eggMaterial.h index a28d779699..c1008ae95c 100644 --- a/panda/src/egg/eggMaterial.h +++ b/panda/src/egg/eggMaterial.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDAEGG EggMaterial : public EggNode { PUBLISHED: - EggMaterial(const string &mref_name); + explicit EggMaterial(const string &mref_name); EggMaterial(const EggMaterial ©); virtual void write(ostream &out, int indent_level) const; diff --git a/panda/src/egg/eggNamedObject.h b/panda/src/egg/eggNamedObject.h index 9f002961cb..140c989237 100644 --- a/panda/src/egg/eggNamedObject.h +++ b/panda/src/egg/eggNamedObject.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDAEGG EggNamedObject : public EggObject, public Namable { PUBLISHED: - INLINE EggNamedObject(const string &name = ""); + INLINE explicit EggNamedObject(const string &name = ""); INLINE EggNamedObject(const EggNamedObject ©); INLINE EggNamedObject &operator = (const EggNamedObject ©); diff --git a/panda/src/egg/eggNode.h b/panda/src/egg/eggNode.h index 0eab76d40d..f4a5df934f 100644 --- a/panda/src/egg/eggNode.h +++ b/panda/src/egg/eggNode.h @@ -34,7 +34,7 @@ class EggTextureCollection; */ class EXPCL_PANDAEGG EggNode : public EggNamedObject { PUBLISHED: - INLINE EggNode(const string &name = ""); + INLINE explicit EggNode(const string &name = ""); INLINE EggNode(const EggNode ©); INLINE EggNode &operator = (const EggNode ©); diff --git a/panda/src/egg/eggNurbsCurve.h b/panda/src/egg/eggNurbsCurve.h index bcd6f1de0c..b6b5bc4b55 100644 --- a/panda/src/egg/eggNurbsCurve.h +++ b/panda/src/egg/eggNurbsCurve.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDAEGG EggNurbsCurve : public EggCurve { PUBLISHED: - INLINE EggNurbsCurve(const string &name = ""); + INLINE explicit EggNurbsCurve(const string &name = ""); INLINE EggNurbsCurve(const EggNurbsCurve ©); INLINE EggNurbsCurve &operator = (const EggNurbsCurve ©); diff --git a/panda/src/egg/eggNurbsSurface.h b/panda/src/egg/eggNurbsSurface.h index bc3d752307..ffadc3cab7 100644 --- a/panda/src/egg/eggNurbsSurface.h +++ b/panda/src/egg/eggNurbsSurface.h @@ -32,7 +32,7 @@ PUBLISHED: typedef Loops Trim; typedef plist Trims; - INLINE EggNurbsSurface(const string &name = ""); + INLINE explicit EggNurbsSurface(const string &name = ""); INLINE EggNurbsSurface(const EggNurbsSurface ©); INLINE EggNurbsSurface &operator = (const EggNurbsSurface ©); diff --git a/panda/src/egg/eggPatch.h b/panda/src/egg/eggPatch.h index 9b31d6e91f..9e93d0ec80 100644 --- a/panda/src/egg/eggPatch.h +++ b/panda/src/egg/eggPatch.h @@ -24,7 +24,7 @@ */ class EXPCL_PANDAEGG EggPatch : public EggPrimitive { PUBLISHED: - INLINE EggPatch(const string &name = ""); + INLINE explicit EggPatch(const string &name = ""); INLINE EggPatch(const EggPatch ©); INLINE EggPatch &operator = (const EggPatch ©); diff --git a/panda/src/egg/eggPoint.h b/panda/src/egg/eggPoint.h index 994727e32e..96e8b63fe6 100644 --- a/panda/src/egg/eggPoint.h +++ b/panda/src/egg/eggPoint.h @@ -24,7 +24,7 @@ */ class EXPCL_PANDAEGG EggPoint : public EggPrimitive { PUBLISHED: - INLINE EggPoint(const string &name = ""); + INLINE explicit EggPoint(const string &name = ""); INLINE EggPoint(const EggPoint ©); INLINE EggPoint &operator = (const EggPoint ©); diff --git a/panda/src/egg/eggPolygon.h b/panda/src/egg/eggPolygon.h index aacd677c13..e5be0e25f0 100644 --- a/panda/src/egg/eggPolygon.h +++ b/panda/src/egg/eggPolygon.h @@ -23,7 +23,7 @@ */ class EXPCL_PANDAEGG EggPolygon : public EggPrimitive { PUBLISHED: - INLINE EggPolygon(const string &name = ""); + INLINE explicit EggPolygon(const string &name = ""); INLINE EggPolygon(const EggPolygon ©); INLINE EggPolygon &operator = (const EggPolygon ©); diff --git a/panda/src/egg/eggPrimitive.h b/panda/src/egg/eggPrimitive.h index 905e049596..4644387632 100644 --- a/panda/src/egg/eggPrimitive.h +++ b/panda/src/egg/eggPrimitive.h @@ -67,7 +67,7 @@ PUBLISHED: S_per_vertex }; - INLINE EggPrimitive(const string &name = ""); + INLINE explicit EggPrimitive(const string &name = ""); INLINE EggPrimitive(const EggPrimitive ©); INLINE EggPrimitive &operator = (const EggPrimitive ©); INLINE ~EggPrimitive(); diff --git a/panda/src/egg/eggSAnimData.h b/panda/src/egg/eggSAnimData.h index b09000f55d..2862b94622 100644 --- a/panda/src/egg/eggSAnimData.h +++ b/panda/src/egg/eggSAnimData.h @@ -24,7 +24,7 @@ */ class EXPCL_PANDAEGG EggSAnimData : public EggAnimData { PUBLISHED: - INLINE EggSAnimData(const string &name = ""); + INLINE explicit EggSAnimData(const string &name = ""); INLINE EggSAnimData(const EggSAnimData ©); INLINE EggSAnimData &operator = (const EggSAnimData ©); diff --git a/panda/src/egg/eggSurface.h b/panda/src/egg/eggSurface.h index eea88f18a8..3085cb1c48 100644 --- a/panda/src/egg/eggSurface.h +++ b/panda/src/egg/eggSurface.h @@ -23,7 +23,7 @@ */ class EXPCL_PANDAEGG EggSurface : public EggPrimitive { PUBLISHED: - INLINE EggSurface(const string &name = ""); + INLINE explicit EggSurface(const string &name = ""); INLINE EggSurface(const EggSurface ©); INLINE EggSurface &operator = (const EggSurface ©); diff --git a/panda/src/egg/eggSwitchCondition.h b/panda/src/egg/eggSwitchCondition.h index aec6a5f545..a1d16db2ca 100644 --- a/panda/src/egg/eggSwitchCondition.h +++ b/panda/src/egg/eggSwitchCondition.h @@ -60,8 +60,8 @@ private: */ class EXPCL_PANDAEGG EggSwitchConditionDistance : public EggSwitchCondition { PUBLISHED: - EggSwitchConditionDistance(double switch_in, double switch_out, - const LPoint3d ¢er, double fade = 0.0); + explicit EggSwitchConditionDistance(double switch_in, double switch_out, + const LPoint3d ¢er, double fade = 0.0); virtual EggSwitchCondition *make_copy() const; virtual void write(ostream &out, int indent_level) const; diff --git a/panda/src/egg/eggTable.h b/panda/src/egg/eggTable.h index 848973d261..e2a55d7a3e 100644 --- a/panda/src/egg/eggTable.h +++ b/panda/src/egg/eggTable.h @@ -32,7 +32,7 @@ PUBLISHED: TT_bundle, }; - INLINE EggTable(const string &name = ""); + INLINE explicit EggTable(const string &name = ""); INLINE EggTable(const EggTable ©); INLINE EggTable &operator = (const EggTable ©); diff --git a/panda/src/egg/eggTexture.h b/panda/src/egg/eggTexture.h index 66636b77bf..174b7c99db 100644 --- a/panda/src/egg/eggTexture.h +++ b/panda/src/egg/eggTexture.h @@ -29,7 +29,7 @@ */ class EXPCL_PANDAEGG EggTexture : public EggFilenameNode, public EggRenderMode, public EggTransform { PUBLISHED: - EggTexture(const string &tref_name, const Filename &filename); + explicit EggTexture(const string &tref_name, const Filename &filename); EggTexture(const EggTexture ©); EggTexture &operator = (const EggTexture ©); virtual ~EggTexture(); diff --git a/panda/src/egg/eggTriangleFan.h b/panda/src/egg/eggTriangleFan.h index 31c8a9e4a4..6435650284 100644 --- a/panda/src/egg/eggTriangleFan.h +++ b/panda/src/egg/eggTriangleFan.h @@ -24,7 +24,7 @@ */ class EXPCL_PANDAEGG EggTriangleFan : public EggCompositePrimitive { PUBLISHED: - INLINE EggTriangleFan(const string &name = ""); + INLINE explicit EggTriangleFan(const string &name = ""); INLINE EggTriangleFan(const EggTriangleFan ©); INLINE EggTriangleFan &operator = (const EggTriangleFan ©); virtual ~EggTriangleFan(); diff --git a/panda/src/egg/eggTriangleStrip.h b/panda/src/egg/eggTriangleStrip.h index e74f248c47..fa371d4185 100644 --- a/panda/src/egg/eggTriangleStrip.h +++ b/panda/src/egg/eggTriangleStrip.h @@ -24,7 +24,7 @@ */ class EXPCL_PANDAEGG EggTriangleStrip : public EggCompositePrimitive { PUBLISHED: - INLINE EggTriangleStrip(const string &name = ""); + INLINE explicit EggTriangleStrip(const string &name = ""); INLINE EggTriangleStrip(const EggTriangleStrip ©); INLINE EggTriangleStrip &operator = (const EggTriangleStrip ©); virtual ~EggTriangleStrip(); diff --git a/panda/src/egg/eggVertexAux.h b/panda/src/egg/eggVertexAux.h index 1d87fe8ad5..b0338cdec3 100644 --- a/panda/src/egg/eggVertexAux.h +++ b/panda/src/egg/eggVertexAux.h @@ -29,7 +29,7 @@ */ class EXPCL_PANDAEGG EggVertexAux : public EggNamedObject { PUBLISHED: - EggVertexAux(const string &name, const LVecBase4d &aux); + explicit EggVertexAux(const string &name, const LVecBase4d &aux); EggVertexAux(const EggVertexAux ©); EggVertexAux &operator = (const EggVertexAux ©); virtual ~EggVertexAux(); diff --git a/panda/src/egg/eggVertexPool.h b/panda/src/egg/eggVertexPool.h index 71e3ac4798..2b44ad38d2 100644 --- a/panda/src/egg/eggVertexPool.h +++ b/panda/src/egg/eggVertexPool.h @@ -65,7 +65,7 @@ public: // Here begins the actual public interface to EggVertexPool. PUBLISHED: - EggVertexPool(const string &name); + explicit EggVertexPool(const string &name); EggVertexPool(const EggVertexPool ©); ~EggVertexPool(); diff --git a/panda/src/egg/eggVertexUV.h b/panda/src/egg/eggVertexUV.h index 8a5bbc03a7..21b6e5b7c2 100644 --- a/panda/src/egg/eggVertexUV.h +++ b/panda/src/egg/eggVertexUV.h @@ -28,8 +28,8 @@ */ class EXPCL_PANDAEGG EggVertexUV : public EggNamedObject { PUBLISHED: - EggVertexUV(const string &name, const LTexCoordd &uv); - EggVertexUV(const string &name, const LTexCoord3d &uvw); + explicit EggVertexUV(const string &name, const LTexCoordd &uv); + explicit EggVertexUV(const string &name, const LTexCoord3d &uvw); EggVertexUV(const EggVertexUV ©); EggVertexUV &operator = (const EggVertexUV ©); virtual ~EggVertexUV(); diff --git a/panda/src/egg/eggXfmAnimData.h b/panda/src/egg/eggXfmAnimData.h index ab4d485481..dac7762931 100644 --- a/panda/src/egg/eggXfmAnimData.h +++ b/panda/src/egg/eggXfmAnimData.h @@ -28,8 +28,8 @@ */ class EXPCL_PANDAEGG EggXfmAnimData : public EggAnimData { PUBLISHED: - INLINE EggXfmAnimData(const string &name = "", - CoordinateSystem cs = CS_default); + INLINE explicit EggXfmAnimData(const string &name = "", + CoordinateSystem cs = CS_default); EggXfmAnimData(const EggXfmSAnim &convert_from); INLINE EggXfmAnimData(const EggXfmAnimData ©); diff --git a/panda/src/egg/eggXfmSAnim.h b/panda/src/egg/eggXfmSAnim.h index 7e46af5f5c..eae0349559 100644 --- a/panda/src/egg/eggXfmSAnim.h +++ b/panda/src/egg/eggXfmSAnim.h @@ -27,8 +27,8 @@ class EggXfmAnimData; */ class EXPCL_PANDAEGG EggXfmSAnim : public EggGroupNode { PUBLISHED: - INLINE EggXfmSAnim(const string &name = "", - CoordinateSystem cs = CS_default); + INLINE explicit EggXfmSAnim(const string &name = "", + CoordinateSystem cs = CS_default); EggXfmSAnim(const EggXfmAnimData &convert_from); INLINE EggXfmSAnim(const EggXfmSAnim ©); diff --git a/panda/src/egg2pg/animBundleMaker.h b/panda/src/egg2pg/animBundleMaker.h index 48d97635ba..fa95030718 100644 --- a/panda/src/egg2pg/animBundleMaker.h +++ b/panda/src/egg2pg/animBundleMaker.h @@ -34,7 +34,7 @@ class AnimChannelMatrixXfmTable; */ class EXPCL_PANDAEGG AnimBundleMaker { public: - AnimBundleMaker(EggTable *root); + explicit AnimBundleMaker(EggTable *root); AnimBundleNode *make_node(); diff --git a/panda/src/event/asyncTaskManager.h b/panda/src/event/asyncTaskManager.h index a92a46b141..8432b217a9 100644 --- a/panda/src/event/asyncTaskManager.h +++ b/panda/src/event/asyncTaskManager.h @@ -47,7 +47,7 @@ */ class EXPCL_PANDA_EVENT AsyncTaskManager : public TypedReferenceCount, public Namable { PUBLISHED: - AsyncTaskManager(const string &name); + explicit AsyncTaskManager(const string &name); BLOCKING virtual ~AsyncTaskManager(); BLOCKING void cleanup(); diff --git a/panda/src/event/asyncTaskSequence.h b/panda/src/event/asyncTaskSequence.h index 4cd4d64d58..de0127a1d8 100644 --- a/panda/src/event/asyncTaskSequence.h +++ b/panda/src/event/asyncTaskSequence.h @@ -32,7 +32,7 @@ class AsyncTaskManager; */ class EXPCL_PANDA_EVENT AsyncTaskSequence : public AsyncTask, public AsyncTaskCollection { PUBLISHED: - AsyncTaskSequence(const string &name); + explicit AsyncTaskSequence(const string &name); virtual ~AsyncTaskSequence(); ALLOC_DELETED_CHAIN(AsyncTaskSequence); diff --git a/panda/src/event/eventHandler.h b/panda/src/event/eventHandler.h index 6a299fcc0e..05952a5082 100644 --- a/panda/src/event/eventHandler.h +++ b/panda/src/event/eventHandler.h @@ -40,7 +40,7 @@ public: typedef void EventCallbackFunction(const Event *, void *); PUBLISHED: - EventHandler(EventQueue *ev_queue); + explicit EventHandler(EventQueue *ev_queue); void process_events(); diff --git a/panda/src/express/patchfile.h b/panda/src/express/patchfile.h index c67b5a039e..c32c1d59e7 100644 --- a/panda/src/express/patchfile.h +++ b/panda/src/express/patchfile.h @@ -39,7 +39,7 @@ class EXPCL_PANDAEXPRESS Patchfile { PUBLISHED: Patchfile(); - Patchfile(PT(Buffer) buffer); + explicit Patchfile(PT(Buffer) buffer); ~Patchfile(); bool build(Filename file_orig, Filename file_new, Filename patch_name); diff --git a/panda/src/express/profileTimer.h b/panda/src/express/profileTimer.h index 48c9f16ad1..94eb39bd01 100644 --- a/panda/src/express/profileTimer.h +++ b/panda/src/express/profileTimer.h @@ -40,7 +40,7 @@ class EXPCL_PANDAEXPRESS ProfileTimer { enum { MaxEntriesDefault=4096 }; PUBLISHED: - ProfileTimer(const char* name=0, int maxEntries=MaxEntriesDefault); + explicit ProfileTimer(const char* name=0, int maxEntries=MaxEntriesDefault); ProfileTimer(const ProfileTimer& other); ~ProfileTimer(); diff --git a/panda/src/express/subStream.h b/panda/src/express/subStream.h index b8a45aa4ac..3d071b9c7f 100644 --- a/panda/src/express/subStream.h +++ b/panda/src/express/subStream.h @@ -30,7 +30,7 @@ class EXPCL_PANDAEXPRESS ISubStream : public istream { PUBLISHED: INLINE ISubStream(); - INLINE ISubStream(IStreamWrapper *source, streampos start, streampos end); + INLINE explicit ISubStream(IStreamWrapper *source, streampos start, streampos end); #if _MSC_VER >= 1800 INLINE ISubStream(const ISubStream ©) = delete; @@ -55,7 +55,7 @@ private: class EXPCL_PANDAEXPRESS OSubStream : public ostream { PUBLISHED: INLINE OSubStream(); - INLINE OSubStream(OStreamWrapper *dest, streampos start, streampos end, bool append = false); + INLINE explicit OSubStream(OStreamWrapper *dest, streampos start, streampos end, bool append = false); #if _MSC_VER >= 1800 INLINE OSubStream(const OSubStream ©) = delete; @@ -74,7 +74,7 @@ private: class EXPCL_PANDAEXPRESS SubStream : public iostream { PUBLISHED: INLINE SubStream(); - INLINE SubStream(StreamWrapper *nested, streampos start, streampos end, bool append = false); + INLINE explicit SubStream(StreamWrapper *nested, streampos start, streampos end, bool append = false); #if _MSC_VER >= 1800 INLINE SubStream(const SubStream ©) = delete; diff --git a/panda/src/express/subfileInfo.h b/panda/src/express/subfileInfo.h index 389263ab76..de2f85fa3e 100644 --- a/panda/src/express/subfileInfo.h +++ b/panda/src/express/subfileInfo.h @@ -26,8 +26,8 @@ class EXPCL_PANDAEXPRESS SubfileInfo { PUBLISHED: INLINE SubfileInfo(); - INLINE SubfileInfo(const FileReference *file, streampos start, streamsize size); - INLINE SubfileInfo(const Filename &filename, streampos start, streamsize size); + INLINE explicit SubfileInfo(const FileReference *file, streampos start, streamsize size); + INLINE explicit SubfileInfo(const Filename &filename, streampos start, streamsize size); INLINE SubfileInfo(const SubfileInfo ©); INLINE void operator = (const SubfileInfo ©); diff --git a/panda/src/express/temporaryFile.h b/panda/src/express/temporaryFile.h index 14874c9cca..8bc66da12b 100644 --- a/panda/src/express/temporaryFile.h +++ b/panda/src/express/temporaryFile.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDAEXPRESS TemporaryFile : public FileReference { PUBLISHED: - INLINE TemporaryFile(const Filename &filename); + INLINE explicit TemporaryFile(const Filename &filename); virtual ~TemporaryFile(); public: diff --git a/panda/src/express/zStream.h b/panda/src/express/zStream.h index d060edba6c..b5fcd2d7a5 100644 --- a/panda/src/express/zStream.h +++ b/panda/src/express/zStream.h @@ -34,7 +34,7 @@ class EXPCL_PANDAEXPRESS IDecompressStream : public istream { PUBLISHED: INLINE IDecompressStream(); - INLINE IDecompressStream(istream *source, bool owns_source); + INLINE explicit IDecompressStream(istream *source, bool owns_source); #if _MSC_VER >= 1800 INLINE IDecompressStream(const IDecompressStream ©) = delete; @@ -60,8 +60,8 @@ private: class EXPCL_PANDAEXPRESS OCompressStream : public ostream { PUBLISHED: INLINE OCompressStream(); - INLINE OCompressStream(ostream *dest, bool owns_dest, - int compression_level = 6); + INLINE explicit OCompressStream(ostream *dest, bool owns_dest, + int compression_level = 6); #if _MSC_VER >= 1800 INLINE OCompressStream(const OCompressStream ©) = delete; diff --git a/panda/src/gobj/adaptiveLru.h b/panda/src/gobj/adaptiveLru.h index cc55b6e706..99b78b482d 100644 --- a/panda/src/gobj/adaptiveLru.h +++ b/panda/src/gobj/adaptiveLru.h @@ -44,7 +44,7 @@ public: */ class EXPCL_PANDA_GOBJ AdaptiveLru : public Namable { PUBLISHED: - AdaptiveLru(const string &name, size_t max_size); + explicit AdaptiveLru(const string &name, size_t max_size); ~AdaptiveLru(); INLINE size_t get_total_size() const; @@ -134,7 +134,7 @@ private: */ class EXPCL_PANDA_GOBJ AdaptiveLruPage : public AdaptiveLruPageDynamicList, public AdaptiveLruPageStaticList { PUBLISHED: - AdaptiveLruPage(size_t lru_size); + explicit AdaptiveLruPage(size_t lru_size); AdaptiveLruPage(const AdaptiveLruPage ©); void operator = (const AdaptiveLruPage ©); diff --git a/panda/src/gobj/animateVerticesRequest.h b/panda/src/gobj/animateVerticesRequest.h index 27e9ba11b2..8b20c4fe9d 100644 --- a/panda/src/gobj/animateVerticesRequest.h +++ b/panda/src/gobj/animateVerticesRequest.h @@ -35,7 +35,7 @@ public: ALLOC_DELETED_CHAIN(AnimateVerticesRequest); PUBLISHED: - INLINE AnimateVerticesRequest(GeomVertexData *geom_vertex_data); + INLINE explicit AnimateVerticesRequest(GeomVertexData *geom_vertex_data); INLINE bool is_ready() const; diff --git a/panda/src/gobj/geomLines.h b/panda/src/gobj/geomLines.h index c6ecfe9c3e..e05a4605c6 100644 --- a/panda/src/gobj/geomLines.h +++ b/panda/src/gobj/geomLines.h @@ -22,7 +22,7 @@ */ class EXPCL_PANDA_GOBJ GeomLines : public GeomPrimitive { PUBLISHED: - GeomLines(UsageHint usage_hint); + explicit GeomLines(UsageHint usage_hint); GeomLines(const GeomLines ©); virtual ~GeomLines(); ALLOC_DELETED_CHAIN(GeomLines); diff --git a/panda/src/gobj/geomLinestrips.h b/panda/src/gobj/geomLinestrips.h index a97251c0d3..ae8956eb3d 100644 --- a/panda/src/gobj/geomLinestrips.h +++ b/panda/src/gobj/geomLinestrips.h @@ -22,7 +22,7 @@ */ class EXPCL_PANDA_GOBJ GeomLinestrips : public GeomPrimitive { PUBLISHED: - GeomLinestrips(UsageHint usage_hint); + explicit GeomLinestrips(UsageHint usage_hint); GeomLinestrips(const GeomLinestrips ©); virtual ~GeomLinestrips(); ALLOC_DELETED_CHAIN(GeomLinestrips); diff --git a/panda/src/gobj/geomPatches.h b/panda/src/gobj/geomPatches.h index a77b627a12..85cda81e59 100644 --- a/panda/src/gobj/geomPatches.h +++ b/panda/src/gobj/geomPatches.h @@ -23,7 +23,7 @@ */ class EXPCL_PANDA_GOBJ GeomPatches : public GeomPrimitive { PUBLISHED: - GeomPatches(int num_vertices_per_patch, UsageHint usage_hint); + explicit GeomPatches(int num_vertices_per_patch, UsageHint usage_hint); GeomPatches(const GeomPatches ©); virtual ~GeomPatches(); ALLOC_DELETED_CHAIN(GeomPatches); diff --git a/panda/src/gobj/geomPoints.h b/panda/src/gobj/geomPoints.h index 0561e18fa6..17116d4166 100644 --- a/panda/src/gobj/geomPoints.h +++ b/panda/src/gobj/geomPoints.h @@ -22,7 +22,7 @@ */ class EXPCL_PANDA_GOBJ GeomPoints : public GeomPrimitive { PUBLISHED: - GeomPoints(UsageHint usage_hint); + explicit GeomPoints(UsageHint usage_hint); GeomPoints(const GeomPoints ©); virtual ~GeomPoints(); ALLOC_DELETED_CHAIN(GeomPoints); diff --git a/panda/src/gobj/geomPrimitive.h b/panda/src/gobj/geomPrimitive.h index eefaf1054c..d596ae7a8e 100644 --- a/panda/src/gobj/geomPrimitive.h +++ b/panda/src/gobj/geomPrimitive.h @@ -59,7 +59,7 @@ protected: virtual PT(CopyOnWriteObject) make_cow_copy(); PUBLISHED: - GeomPrimitive(UsageHint usage_hint); + explicit GeomPrimitive(UsageHint usage_hint); GeomPrimitive(const GeomPrimitive ©); void operator = (const GeomPrimitive ©); virtual ~GeomPrimitive(); diff --git a/panda/src/gobj/geomTriangles.h b/panda/src/gobj/geomTriangles.h index f2e4d4de73..d78b783b40 100644 --- a/panda/src/gobj/geomTriangles.h +++ b/panda/src/gobj/geomTriangles.h @@ -22,7 +22,7 @@ */ class EXPCL_PANDA_GOBJ GeomTriangles : public GeomPrimitive { PUBLISHED: - GeomTriangles(UsageHint usage_hint); + explicit GeomTriangles(UsageHint usage_hint); GeomTriangles(const GeomTriangles ©); virtual ~GeomTriangles(); ALLOC_DELETED_CHAIN(GeomTriangles); diff --git a/panda/src/gobj/geomTrifans.h b/panda/src/gobj/geomTrifans.h index 0a3380faa8..69f8b43fba 100644 --- a/panda/src/gobj/geomTrifans.h +++ b/panda/src/gobj/geomTrifans.h @@ -22,7 +22,7 @@ */ class EXPCL_PANDA_GOBJ GeomTrifans : public GeomPrimitive { PUBLISHED: - GeomTrifans(UsageHint usage_hint); + explicit GeomTrifans(UsageHint usage_hint); GeomTrifans(const GeomTrifans ©); virtual ~GeomTrifans(); ALLOC_DELETED_CHAIN(GeomTrifans); diff --git a/panda/src/gobj/geomTristrips.h b/panda/src/gobj/geomTristrips.h index 5bffb872d2..43e7364b22 100644 --- a/panda/src/gobj/geomTristrips.h +++ b/panda/src/gobj/geomTristrips.h @@ -22,7 +22,7 @@ */ class EXPCL_PANDA_GOBJ GeomTristrips : public GeomPrimitive { PUBLISHED: - GeomTristrips(UsageHint usage_hint); + explicit GeomTristrips(UsageHint usage_hint); GeomTristrips(const GeomTristrips ©); virtual ~GeomTristrips(); ALLOC_DELETED_CHAIN(GeomTristrips); diff --git a/panda/src/gobj/geomVertexColumn.h b/panda/src/gobj/geomVertexColumn.h index 8fa91dadfe..5e8df9821e 100644 --- a/panda/src/gobj/geomVertexColumn.h +++ b/panda/src/gobj/geomVertexColumn.h @@ -38,10 +38,10 @@ class EXPCL_PANDA_GOBJ GeomVertexColumn : public GeomEnums { private: INLINE GeomVertexColumn(); PUBLISHED: - INLINE GeomVertexColumn(CPT_InternalName name, int num_components, - NumericType numeric_type, Contents contents, - int start, int column_alignment = 0, - int num_elements = 0, int element_stride = 0); + INLINE explicit GeomVertexColumn(CPT_InternalName name, int num_components, + NumericType numeric_type, Contents contents, + int start, int column_alignment = 0, + int num_elements = 0, int element_stride = 0); INLINE GeomVertexColumn(const GeomVertexColumn ©); void operator = (const GeomVertexColumn ©); INLINE ~GeomVertexColumn(); diff --git a/panda/src/gobj/perspectiveLens.h b/panda/src/gobj/perspectiveLens.h index 556b3b2fd0..dfda234645 100644 --- a/panda/src/gobj/perspectiveLens.h +++ b/panda/src/gobj/perspectiveLens.h @@ -25,7 +25,7 @@ class EXPCL_PANDA_GOBJ PerspectiveLens : public Lens { PUBLISHED: INLINE PerspectiveLens(); - INLINE PerspectiveLens(PN_stdfloat hfov, PN_stdfloat vfov); + INLINE explicit PerspectiveLens(PN_stdfloat hfov, PN_stdfloat vfov); public: INLINE PerspectiveLens(const PerspectiveLens ©); diff --git a/panda/src/gobj/shaderBuffer.h b/panda/src/gobj/shaderBuffer.h index 549ebdc536..f5fe50dbc1 100644 --- a/panda/src/gobj/shaderBuffer.h +++ b/panda/src/gobj/shaderBuffer.h @@ -32,8 +32,8 @@ private: INLINE ShaderBuffer() DEFAULT_CTOR; PUBLISHED: - INLINE ShaderBuffer(const string &name, uint64_t size, UsageHint usage_hint); - INLINE ShaderBuffer(const string &name, pvector initial_data, UsageHint usage_hint); + INLINE explicit ShaderBuffer(const string &name, uint64_t size, UsageHint usage_hint); + INLINE explicit ShaderBuffer(const string &name, pvector initial_data, UsageHint usage_hint); public: INLINE uint64_t get_data_size_bytes() const; diff --git a/panda/src/gobj/simpleAllocator.h b/panda/src/gobj/simpleAllocator.h index 4bc417c39c..7793fdc3fe 100644 --- a/panda/src/gobj/simpleAllocator.h +++ b/panda/src/gobj/simpleAllocator.h @@ -28,7 +28,7 @@ class SimpleAllocatorBlock; */ class EXPCL_PANDA_GOBJ SimpleAllocator : public LinkedListNode { PUBLISHED: - INLINE SimpleAllocator(size_t max_size, Mutex &lock); + INLINE explicit SimpleAllocator(size_t max_size, Mutex &lock); virtual ~SimpleAllocator(); INLINE SimpleAllocatorBlock *alloc(size_t size); diff --git a/panda/src/gobj/simpleLru.h b/panda/src/gobj/simpleLru.h index 16669e5a12..0eaaced1c8 100644 --- a/panda/src/gobj/simpleLru.h +++ b/panda/src/gobj/simpleLru.h @@ -27,7 +27,7 @@ class SimpleLruPage; */ class EXPCL_PANDA_GOBJ SimpleLru : public LinkedListNode, public Namable { PUBLISHED: - SimpleLru(const string &name, size_t max_size); + explicit SimpleLru(const string &name, size_t max_size); ~SimpleLru(); INLINE size_t get_total_size() const; @@ -64,7 +64,7 @@ private: */ class EXPCL_PANDA_GOBJ SimpleLruPage : public LinkedListNode { PUBLISHED: - INLINE SimpleLruPage(size_t lru_size); + INLINE explicit SimpleLruPage(size_t lru_size); INLINE SimpleLruPage(const SimpleLruPage ©); INLINE void operator = (const SimpleLruPage ©); diff --git a/panda/src/gobj/textureReloadRequest.h b/panda/src/gobj/textureReloadRequest.h index 92f0fdd1f8..ce0684a135 100644 --- a/panda/src/gobj/textureReloadRequest.h +++ b/panda/src/gobj/textureReloadRequest.h @@ -33,9 +33,10 @@ public: ALLOC_DELETED_CHAIN(TextureReloadRequest); PUBLISHED: - INLINE TextureReloadRequest(const string &name, - PreparedGraphicsObjects *pgo, Texture *texture, - bool allow_compressed); + INLINE explicit TextureReloadRequest(const string &name, + PreparedGraphicsObjects *pgo, + Texture *texture, + bool allow_compressed); INLINE PreparedGraphicsObjects *get_prepared_graphics_objects() const; INLINE Texture *get_texture() const; diff --git a/panda/src/gobj/userVertexSlider.h b/panda/src/gobj/userVertexSlider.h index b4db1ed6a2..aadeafd893 100644 --- a/panda/src/gobj/userVertexSlider.h +++ b/panda/src/gobj/userVertexSlider.h @@ -30,8 +30,8 @@ class FactoryParams; */ class EXPCL_PANDA_GOBJ UserVertexSlider : public VertexSlider { PUBLISHED: - UserVertexSlider(const string &name); - UserVertexSlider(const InternalName *name); + explicit UserVertexSlider(const string &name); + explicit UserVertexSlider(const InternalName *name); INLINE void set_slider(PN_stdfloat slider); virtual PN_stdfloat get_slider() const; diff --git a/panda/src/gobj/userVertexTransform.h b/panda/src/gobj/userVertexTransform.h index 53b95c05f0..377dff2a17 100644 --- a/panda/src/gobj/userVertexTransform.h +++ b/panda/src/gobj/userVertexTransform.h @@ -30,7 +30,7 @@ class FactoryParams; */ class EXPCL_PANDA_GOBJ UserVertexTransform : public VertexTransform { PUBLISHED: - UserVertexTransform(const string &name); + explicit UserVertexTransform(const string &name); INLINE const string &get_name() const; diff --git a/panda/src/gobj/vertexDataBook.h b/panda/src/gobj/vertexDataBook.h index dfbf649a54..9f77316157 100644 --- a/panda/src/gobj/vertexDataBook.h +++ b/panda/src/gobj/vertexDataBook.h @@ -29,7 +29,7 @@ class VertexDataBlock; */ class EXPCL_PANDA_GOBJ VertexDataBook { PUBLISHED: - VertexDataBook(size_t block_size); + explicit VertexDataBook(size_t block_size); ~VertexDataBook(); INLINE VertexDataBlock *alloc(size_t size); diff --git a/panda/src/gobj/vertexSlider.h b/panda/src/gobj/vertexSlider.h index 1c4274b437..7c3c135292 100644 --- a/panda/src/gobj/vertexSlider.h +++ b/panda/src/gobj/vertexSlider.h @@ -36,7 +36,7 @@ class SliderTable; */ class EXPCL_PANDA_GOBJ VertexSlider : public TypedWritableReferenceCount { PUBLISHED: - VertexSlider(const InternalName *name); + explicit VertexSlider(const InternalName *name); virtual ~VertexSlider(); INLINE const InternalName *get_name() const; diff --git a/panda/src/grutil/cardMaker.h b/panda/src/grutil/cardMaker.h index c9d28b8f09..ff8e6e2eb6 100644 --- a/panda/src/grutil/cardMaker.h +++ b/panda/src/grutil/cardMaker.h @@ -28,7 +28,7 @@ */ class EXPCL_PANDA_GRUTIL CardMaker : public Namable { PUBLISHED: - INLINE CardMaker(const string &name); + INLINE explicit CardMaker(const string &name); INLINE ~CardMaker(); void reset(); diff --git a/panda/src/grutil/fisheyeMaker.h b/panda/src/grutil/fisheyeMaker.h index f3ce45fe96..d6bb5b7a73 100644 --- a/panda/src/grutil/fisheyeMaker.h +++ b/panda/src/grutil/fisheyeMaker.h @@ -33,7 +33,7 @@ class GeomVertexWriter; */ class EXPCL_PANDA_GRUTIL FisheyeMaker : public Namable { PUBLISHED: - INLINE FisheyeMaker(const string &name); + INLINE explicit FisheyeMaker(const string &name); INLINE ~FisheyeMaker(); void reset(); diff --git a/panda/src/grutil/frameRateMeter.h b/panda/src/grutil/frameRateMeter.h index 1f0c0f29a8..2e3f657819 100644 --- a/panda/src/grutil/frameRateMeter.h +++ b/panda/src/grutil/frameRateMeter.h @@ -36,7 +36,7 @@ class ClockObject; */ class EXPCL_PANDA_GRUTIL FrameRateMeter : public TextNode { PUBLISHED: - FrameRateMeter(const string &name); + explicit FrameRateMeter(const string &name); virtual ~FrameRateMeter(); void setup_window(GraphicsOutput *window); diff --git a/panda/src/grutil/geoMipTerrain.h b/panda/src/grutil/geoMipTerrain.h index 87115496d0..88727e9077 100644 --- a/panda/src/grutil/geoMipTerrain.h +++ b/panda/src/grutil/geoMipTerrain.h @@ -35,7 +35,7 @@ */ class EXPCL_PANDA_GRUTIL GeoMipTerrain : public TypedObject { PUBLISHED: - INLINE GeoMipTerrain(const string &name); + INLINE explicit GeoMipTerrain(const string &name); INLINE ~GeoMipTerrain(); INLINE PNMImage &heightfield(); diff --git a/panda/src/grutil/heightfieldTesselator.h b/panda/src/grutil/heightfieldTesselator.h index f206b3e201..247d1de218 100644 --- a/panda/src/grutil/heightfieldTesselator.h +++ b/panda/src/grutil/heightfieldTesselator.h @@ -57,7 +57,7 @@ class EXPCL_PANDA_GRUTIL HeightfieldTesselator : public Namable { PUBLISHED: - INLINE HeightfieldTesselator(const string &name); + INLINE explicit HeightfieldTesselator(const string &name); INLINE ~HeightfieldTesselator(); INLINE PNMImage &heightfield(); diff --git a/panda/src/grutil/lineSegs.h b/panda/src/grutil/lineSegs.h index c740b524ae..174467da31 100644 --- a/panda/src/grutil/lineSegs.h +++ b/panda/src/grutil/lineSegs.h @@ -32,7 +32,7 @@ */ class EXPCL_PANDA_GRUTIL LineSegs : public Namable { PUBLISHED: - LineSegs(const string &name = "lines"); + explicit LineSegs(const string &name = "lines"); ~LineSegs(); void reset(); diff --git a/panda/src/grutil/movieTexture.h b/panda/src/grutil/movieTexture.h index a02b6bf3d3..d719f21d87 100644 --- a/panda/src/grutil/movieTexture.h +++ b/panda/src/grutil/movieTexture.h @@ -32,8 +32,8 @@ */ class EXPCL_PANDA_GRUTIL MovieTexture : public Texture { PUBLISHED: - MovieTexture(const string &name); - MovieTexture(MovieVideo *video); + explicit MovieTexture(const string &name); + explicit MovieTexture(MovieVideo *video); private: MovieTexture(const MovieTexture ©); PUBLISHED: diff --git a/panda/src/grutil/pfmVizzer.h b/panda/src/grutil/pfmVizzer.h index e8423f8dd1..e04e8a06bc 100644 --- a/panda/src/grutil/pfmVizzer.h +++ b/panda/src/grutil/pfmVizzer.h @@ -29,7 +29,7 @@ class GeomVertexWriter; */ class EXPCL_PANDA_GRUTIL PfmVizzer { PUBLISHED: - PfmVizzer(PfmFile &pfm); + explicit PfmVizzer(PfmFile &pfm); INLINE ~PfmVizzer(); INLINE PfmFile &get_pfm(); INLINE const PfmFile &get_pfm() const; diff --git a/panda/src/grutil/pipeOcclusionCullTraverser.h b/panda/src/grutil/pipeOcclusionCullTraverser.h index 7283f5501f..55d2a795ce 100644 --- a/panda/src/grutil/pipeOcclusionCullTraverser.h +++ b/panda/src/grutil/pipeOcclusionCullTraverser.h @@ -41,7 +41,7 @@ class GraphicsStateGuardian; class EXPCL_PANDA_GRUTIL PipeOcclusionCullTraverser : public CullTraverser, public CullHandler { PUBLISHED: - PipeOcclusionCullTraverser(GraphicsOutput *host); + explicit PipeOcclusionCullTraverser(GraphicsOutput *host); PipeOcclusionCullTraverser(const PipeOcclusionCullTraverser ©); virtual void set_scene(SceneSetup *scene_setup, diff --git a/panda/src/grutil/rigidBodyCombiner.h b/panda/src/grutil/rigidBodyCombiner.h index 1f92cda3cb..fca66e0031 100644 --- a/panda/src/grutil/rigidBodyCombiner.h +++ b/panda/src/grutil/rigidBodyCombiner.h @@ -43,7 +43,7 @@ class NodePath; */ class EXPCL_PANDA_GRUTIL RigidBodyCombiner : public PandaNode { PUBLISHED: - RigidBodyCombiner(const string &name); + explicit RigidBodyCombiner(const string &name); protected: RigidBodyCombiner(const RigidBodyCombiner ©); virtual PandaNode *make_copy() const; diff --git a/panda/src/grutil/sceneGraphAnalyzerMeter.h b/panda/src/grutil/sceneGraphAnalyzerMeter.h index c6046255e3..a788ef2f2b 100644 --- a/panda/src/grutil/sceneGraphAnalyzerMeter.h +++ b/panda/src/grutil/sceneGraphAnalyzerMeter.h @@ -38,7 +38,7 @@ class ClockObject; */ class EXPCL_PANDA SceneGraphAnalyzerMeter : public TextNode { PUBLISHED: - SceneGraphAnalyzerMeter(const string &name, PandaNode *node); + explicit SceneGraphAnalyzerMeter(const string &name, PandaNode *node); virtual ~SceneGraphAnalyzerMeter(); void setup_window(GraphicsOutput *window); diff --git a/panda/src/mathutil/boundingBox.h b/panda/src/mathutil/boundingBox.h index 53c24c521d..2ba4b273e1 100644 --- a/panda/src/mathutil/boundingBox.h +++ b/panda/src/mathutil/boundingBox.h @@ -29,7 +29,7 @@ class EXPCL_PANDA_MATHUTIL BoundingBox : public FiniteBoundingVolume { PUBLISHED: INLINE_MATHUTIL BoundingBox(); - INLINE_MATHUTIL BoundingBox(const LPoint3 &min, const LPoint3 &max); + INLINE_MATHUTIL explicit BoundingBox(const LPoint3 &min, const LPoint3 &max); ALLOC_DELETED_CHAIN(BoundingBox); public: diff --git a/panda/src/mathutil/boundingLine.h b/panda/src/mathutil/boundingLine.h index c3a089cfc2..15e5f43417 100644 --- a/panda/src/mathutil/boundingLine.h +++ b/panda/src/mathutil/boundingLine.h @@ -31,7 +31,7 @@ public: INLINE_MATHUTIL BoundingLine(); PUBLISHED: - INLINE_MATHUTIL BoundingLine(const LPoint3 &a, const LPoint3 &b); + INLINE_MATHUTIL explicit BoundingLine(const LPoint3 &a, const LPoint3 &b); ALLOC_DELETED_CHAIN(BoundingLine); public: diff --git a/panda/src/mathutil/boundingSphere.h b/panda/src/mathutil/boundingSphere.h index 9a51a015ac..09027e3b8c 100644 --- a/panda/src/mathutil/boundingSphere.h +++ b/panda/src/mathutil/boundingSphere.h @@ -25,7 +25,7 @@ class EXPCL_PANDA_MATHUTIL BoundingSphere : public FiniteBoundingVolume { PUBLISHED: INLINE_MATHUTIL BoundingSphere(); - INLINE_MATHUTIL BoundingSphere(const LPoint3 ¢er, PN_stdfloat radius); + INLINE_MATHUTIL explicit BoundingSphere(const LPoint3 ¢er, PN_stdfloat radius); ALLOC_DELETED_CHAIN(BoundingSphere); public: diff --git a/panda/src/mathutil/mersenne.h b/panda/src/mathutil/mersenne.h index 6422c827d7..7bcb00cb8f 100644 --- a/panda/src/mathutil/mersenne.h +++ b/panda/src/mathutil/mersenne.h @@ -61,7 +61,7 @@ class EXPCL_PANDA_MATHUTIL Mersenne { PUBLISHED: - Mersenne(unsigned long seed); + explicit Mersenne(unsigned long seed); unsigned long get_uint31(); enum { diff --git a/panda/src/mathutil/perlinNoise2.h b/panda/src/mathutil/perlinNoise2.h index 11d82aa064..d10555e38b 100644 --- a/panda/src/mathutil/perlinNoise2.h +++ b/panda/src/mathutil/perlinNoise2.h @@ -25,9 +25,9 @@ class EXPCL_PANDA_MATHUTIL PerlinNoise2 : public PerlinNoise { PUBLISHED: INLINE PerlinNoise2(); - INLINE PerlinNoise2(double sx, double sy, - int table_size = 256, - unsigned long seed = 0); + INLINE explicit PerlinNoise2(double sx, double sy, + int table_size = 256, + unsigned long seed = 0); INLINE PerlinNoise2(const PerlinNoise2 ©); INLINE void operator = (const PerlinNoise2 ©); diff --git a/panda/src/mathutil/perlinNoise3.h b/panda/src/mathutil/perlinNoise3.h index 092091ef2f..df47b22b4e 100644 --- a/panda/src/mathutil/perlinNoise3.h +++ b/panda/src/mathutil/perlinNoise3.h @@ -25,8 +25,9 @@ class EXPCL_PANDA_MATHUTIL PerlinNoise3 : public PerlinNoise { PUBLISHED: INLINE PerlinNoise3(); - INLINE PerlinNoise3(double sx, double sy, double sz, - int table_size = 256, unsigned long seed = 0); + INLINE explicit PerlinNoise3(double sx, double sy, double sz, + int table_size = 256, + unsigned long seed = 0); INLINE PerlinNoise3(const PerlinNoise3 ©); INLINE void operator = (const PerlinNoise3 ©); diff --git a/panda/src/mathutil/randomizer.h b/panda/src/mathutil/randomizer.h index 4f0dd0e736..3fd9715f2a 100644 --- a/panda/src/mathutil/randomizer.h +++ b/panda/src/mathutil/randomizer.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDA_MATHUTIL Randomizer { PUBLISHED: - INLINE Randomizer(unsigned long seed = 0); + INLINE explicit Randomizer(unsigned long seed = 0); INLINE Randomizer(const Randomizer ©); INLINE void operator = (const Randomizer ©); diff --git a/panda/src/mathutil/stackedPerlinNoise2.h b/panda/src/mathutil/stackedPerlinNoise2.h index e292e21fe6..9628d39557 100644 --- a/panda/src/mathutil/stackedPerlinNoise2.h +++ b/panda/src/mathutil/stackedPerlinNoise2.h @@ -25,9 +25,9 @@ class EXPCL_PANDA_MATHUTIL StackedPerlinNoise2 { PUBLISHED: INLINE StackedPerlinNoise2(); - StackedPerlinNoise2(double sx, double sy, int num_levels = 2, - double scale_factor = 4.0f, double amp_scale = 0.5f, - int table_size = 256, unsigned long seed = 0); + explicit StackedPerlinNoise2(double sx, double sy, int num_levels = 2, + double scale_factor = 4.0f, double amp_scale = 0.5f, + int table_size = 256, unsigned long seed = 0); StackedPerlinNoise2(const StackedPerlinNoise2 ©); void operator = (const StackedPerlinNoise2 ©); diff --git a/panda/src/mathutil/stackedPerlinNoise3.h b/panda/src/mathutil/stackedPerlinNoise3.h index eb3b0da1e0..b2ff1ccdd2 100644 --- a/panda/src/mathutil/stackedPerlinNoise3.h +++ b/panda/src/mathutil/stackedPerlinNoise3.h @@ -25,9 +25,9 @@ class EXPCL_PANDA_MATHUTIL StackedPerlinNoise3 { PUBLISHED: INLINE StackedPerlinNoise3(); - StackedPerlinNoise3(double sx, double sy, double sz, int num_levels = 3, - double scale_factor = 4.0f, double amp_scale = 0.5f, - int table_size = 256, unsigned long seed = 0); + explicit StackedPerlinNoise3(double sx, double sy, double sz, int num_levels = 3, + double scale_factor = 4.0f, double amp_scale = 0.5f, + int table_size = 256, unsigned long seed = 0); StackedPerlinNoise3(const StackedPerlinNoise3 ©); void operator = (const StackedPerlinNoise3 ©); diff --git a/panda/src/movies/flacAudioCursor.h b/panda/src/movies/flacAudioCursor.h index 4f68eb62a8..edae05a674 100644 --- a/panda/src/movies/flacAudioCursor.h +++ b/panda/src/movies/flacAudioCursor.h @@ -30,7 +30,7 @@ class FlacAudio; */ class EXPCL_PANDA_MOVIES FlacAudioCursor : public MovieAudioCursor { PUBLISHED: - FlacAudioCursor(FlacAudio *src, istream *stream); + explicit FlacAudioCursor(FlacAudio *src, istream *stream); virtual ~FlacAudioCursor(); virtual void seek(double offset); diff --git a/panda/src/movies/inkblotVideo.h b/panda/src/movies/inkblotVideo.h index 379d59a850..b5bd7db670 100644 --- a/panda/src/movies/inkblotVideo.h +++ b/panda/src/movies/inkblotVideo.h @@ -22,13 +22,12 @@ class InkblotVideoCursor; * A cellular automaton that generates an amusing pattern of swirling colors. */ class EXPCL_PANDA_MOVIES InkblotVideo : public MovieVideo { - - PUBLISHED: - InkblotVideo(int x, int y, int fps); +PUBLISHED: + explicit InkblotVideo(int x, int y, int fps); virtual ~InkblotVideo(); virtual PT(MovieVideoCursor) open(); - private: +private: int _specified_x; int _specified_y; int _specified_fps; diff --git a/panda/src/movies/opusAudioCursor.h b/panda/src/movies/opusAudioCursor.h index 55a717afcf..51916fbc29 100644 --- a/panda/src/movies/opusAudioCursor.h +++ b/panda/src/movies/opusAudioCursor.h @@ -31,7 +31,7 @@ class OpusAudio; */ class EXPCL_PANDA_MOVIES OpusAudioCursor : public MovieAudioCursor { PUBLISHED: - OpusAudioCursor(OpusAudio *src, istream *stream); + explicit OpusAudioCursor(OpusAudio *src, istream *stream); virtual ~OpusAudioCursor(); virtual void seek(double offset); diff --git a/panda/src/movies/vorbisAudioCursor.h b/panda/src/movies/vorbisAudioCursor.h index 2d16368dde..4a9bb79847 100644 --- a/panda/src/movies/vorbisAudioCursor.h +++ b/panda/src/movies/vorbisAudioCursor.h @@ -30,7 +30,7 @@ class VorbisAudio; */ class EXPCL_PANDA_MOVIES VorbisAudioCursor : public MovieAudioCursor { PUBLISHED: - VorbisAudioCursor(VorbisAudio *src, istream *stream); + explicit VorbisAudioCursor(VorbisAudio *src, istream *stream); virtual ~VorbisAudioCursor(); virtual void seek(double offset); diff --git a/panda/src/movies/wavAudioCursor.h b/panda/src/movies/wavAudioCursor.h index e03ee5bdde..2f37f37f4e 100644 --- a/panda/src/movies/wavAudioCursor.h +++ b/panda/src/movies/wavAudioCursor.h @@ -26,7 +26,7 @@ class WavAudio; */ class EXPCL_PANDA_MOVIES WavAudioCursor : public MovieAudioCursor { PUBLISHED: - WavAudioCursor(WavAudio *src, istream *stream); + explicit WavAudioCursor(WavAudio *src, istream *stream); virtual ~WavAudioCursor(); virtual void seek(double offset); diff --git a/panda/src/nativenet/buffered_datagramconnection.h b/panda/src/nativenet/buffered_datagramconnection.h index 53b4b5d957..27e5405339 100644 --- a/panda/src/nativenet/buffered_datagramconnection.h +++ b/panda/src/nativenet/buffered_datagramconnection.h @@ -82,7 +82,7 @@ PUBLISHED: inline bool GetMessage(Datagram &val); inline bool DoConnect(void); // all the real state magic is in here inline bool IsConnected(void); - inline Buffered_DatagramConnection(int rbufsize, int wbufsize, int write_flush_point) ; + inline explicit Buffered_DatagramConnection(int rbufsize, int wbufsize, int write_flush_point) ; virtual ~Buffered_DatagramConnection(void) ; // the reason thsi all exists bool SendMessage(const Datagram &msg); diff --git a/panda/src/nativenet/socket_address.h b/panda/src/nativenet/socket_address.h index 20046e3d24..f8141ae987 100644 --- a/panda/src/nativenet/socket_address.h +++ b/panda/src/nativenet/socket_address.h @@ -32,7 +32,7 @@ public: INLINE const struct sockaddr &GetAddressInfo() const { return _addr; } PUBLISHED: - INLINE Socket_Address(unsigned short port = 0); + INLINE explicit Socket_Address(unsigned short port = 0); INLINE Socket_Address(const Socket_Address &inaddr); INLINE virtual ~Socket_Address(); diff --git a/panda/src/net/connection.h b/panda/src/net/connection.h index 92cbf12166..bac0c8def0 100644 --- a/panda/src/net/connection.h +++ b/panda/src/net/connection.h @@ -28,7 +28,7 @@ class NetDatagram; */ class EXPCL_PANDA_NET Connection : public ReferenceCount { PUBLISHED: - Connection(ConnectionManager *manager, Socket_IP *socket); + explicit Connection(ConnectionManager *manager, Socket_IP *socket); ~Connection(); NetAddress get_address() const; diff --git a/panda/src/net/connectionReader.h b/panda/src/net/connectionReader.h index 3f00fa538b..fb9542df4a 100644 --- a/panda/src/net/connectionReader.h +++ b/panda/src/net/connectionReader.h @@ -60,8 +60,8 @@ PUBLISHED: // by a previous call to PR_Poll(), or (b) execute (and possibly block on) a // new call to PR_Poll(). - ConnectionReader(ConnectionManager *manager, int num_threads, - const string &thread_name = string()); + explicit ConnectionReader(ConnectionManager *manager, int num_threads, + const string &thread_name = string()); virtual ~ConnectionReader(); bool add_connection(Connection *connection); diff --git a/panda/src/net/connectionWriter.h b/panda/src/net/connectionWriter.h index 71f74bb0a1..58a0300ef6 100644 --- a/panda/src/net/connectionWriter.h +++ b/panda/src/net/connectionWriter.h @@ -34,8 +34,8 @@ class NetAddress; */ class EXPCL_PANDA_NET ConnectionWriter { PUBLISHED: - ConnectionWriter(ConnectionManager *manager, int num_threads, - const string &thread_name = string()); + explicit ConnectionWriter(ConnectionManager *manager, int num_threads, + const string &thread_name = string()); ~ConnectionWriter(); void set_max_queue_size(int max_size); diff --git a/panda/src/net/datagramGeneratorNet.h b/panda/src/net/datagramGeneratorNet.h index be255a5b10..7926fb8483 100644 --- a/panda/src/net/datagramGeneratorNet.h +++ b/panda/src/net/datagramGeneratorNet.h @@ -32,7 +32,7 @@ EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_NET, EXPTP_PANDA_NET, QueuedReturn); */ class EXPCL_PANDA_NET DatagramGeneratorNet : public DatagramGenerator, public ConnectionReader, public QueuedReturn { PUBLISHED: - DatagramGeneratorNet(ConnectionManager *manager, int num_threads); + explicit DatagramGeneratorNet(ConnectionManager *manager, int num_threads); virtual ~DatagramGeneratorNet(); // Inherited from DatagramGenerator diff --git a/panda/src/net/datagramSinkNet.h b/panda/src/net/datagramSinkNet.h index b188fb6011..927933b118 100644 --- a/panda/src/net/datagramSinkNet.h +++ b/panda/src/net/datagramSinkNet.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDA_NET DatagramSinkNet : public DatagramSink, public ConnectionWriter { PUBLISHED: - DatagramSinkNet(ConnectionManager *manager, int num_threads); + explicit DatagramSinkNet(ConnectionManager *manager, int num_threads); INLINE void set_target(Connection *connection); INLINE Connection *get_target() const; diff --git a/panda/src/net/queuedConnectionListener.h b/panda/src/net/queuedConnectionListener.h index 7aea32afc8..4fbace6c2d 100644 --- a/panda/src/net/queuedConnectionListener.h +++ b/panda/src/net/queuedConnectionListener.h @@ -45,7 +45,7 @@ EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_NET, EXPTP_PANDA_NET, QueuedReturn { PUBLISHED: - QueuedConnectionListener(ConnectionManager *manager, int num_threads); + explicit QueuedConnectionListener(ConnectionManager *manager, int num_threads); virtual ~QueuedConnectionListener(); BLOCKING bool new_connection_available(); diff --git a/panda/src/net/queuedConnectionReader.h b/panda/src/net/queuedConnectionReader.h index 3ce7461558..680876733b 100644 --- a/panda/src/net/queuedConnectionReader.h +++ b/panda/src/net/queuedConnectionReader.h @@ -33,7 +33,7 @@ EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_NET, EXPTP_PANDA_NET, QueuedReturn { PUBLISHED: - QueuedConnectionReader(ConnectionManager *manager, int num_threads); + explicit QueuedConnectionReader(ConnectionManager *manager, int num_threads); virtual ~QueuedConnectionReader(); BLOCKING bool data_available(); diff --git a/panda/src/net/recentConnectionReader.h b/panda/src/net/recentConnectionReader.h index f31f20ac2e..513f0fc6b2 100644 --- a/panda/src/net/recentConnectionReader.h +++ b/panda/src/net/recentConnectionReader.h @@ -31,7 +31,7 @@ */ class EXPCL_PANDA_NET RecentConnectionReader : public ConnectionReader { PUBLISHED: - RecentConnectionReader(ConnectionManager *manager); + explicit RecentConnectionReader(ConnectionManager *manager); virtual ~RecentConnectionReader(); bool data_available(); diff --git a/panda/src/parametrics/ropeNode.h b/panda/src/parametrics/ropeNode.h index c60a1b9d0b..063070c802 100644 --- a/panda/src/parametrics/ropeNode.h +++ b/panda/src/parametrics/ropeNode.h @@ -33,7 +33,7 @@ class GeomVertexData; */ class EXPCL_PANDA_PARAMETRICS RopeNode : public PandaNode { PUBLISHED: - RopeNode(const string &name); + explicit RopeNode(const string &name); protected: RopeNode(const RopeNode ©); diff --git a/panda/src/parametrics/sheetNode.h b/panda/src/parametrics/sheetNode.h index fdf8467212..29374955a7 100644 --- a/panda/src/parametrics/sheetNode.h +++ b/panda/src/parametrics/sheetNode.h @@ -31,7 +31,7 @@ */ class EXPCL_PANDA_PARAMETRICS SheetNode : public PandaNode { PUBLISHED: - SheetNode(const string &name); + explicit SheetNode(const string &name); protected: SheetNode(const SheetNode ©); diff --git a/panda/src/particlesystem/colorInterpolationManager.h b/panda/src/particlesystem/colorInterpolationManager.h index db954e178d..6c01d95b24 100644 --- a/panda/src/particlesystem/colorInterpolationManager.h +++ b/panda/src/particlesystem/colorInterpolationManager.h @@ -225,9 +225,12 @@ private: */ class EXPCL_PANDAPHYSICS ColorInterpolationSegment : public ReferenceCount { -PUBLISHED: +public: ColorInterpolationSegment(ColorInterpolationFunction* function, const PN_stdfloat &time_begin, const PN_stdfloat &time_end, const bool is_modulated, const int id); + +PUBLISHED: ColorInterpolationSegment(const ColorInterpolationSegment &s); + virtual ~ColorInterpolationSegment(); // INLINE ColorInterpolationFunction* get_function() const; diff --git a/panda/src/particlesystem/geomParticleRenderer.h b/panda/src/particlesystem/geomParticleRenderer.h index 4ef60906f0..54e58a2d65 100644 --- a/panda/src/particlesystem/geomParticleRenderer.h +++ b/panda/src/particlesystem/geomParticleRenderer.h @@ -25,8 +25,8 @@ class EXPCL_PANDAPHYSICS GeomParticleRenderer : public BaseParticleRenderer { PUBLISHED: - GeomParticleRenderer(ParticleRendererAlphaMode am = PR_ALPHA_NONE, - PandaNode *geom_node = (PandaNode *) NULL); + explicit GeomParticleRenderer(ParticleRendererAlphaMode am = PR_ALPHA_NONE, + PandaNode *geom_node = (PandaNode *) NULL); GeomParticleRenderer(const GeomParticleRenderer& copy); virtual ~GeomParticleRenderer(); diff --git a/panda/src/particlesystem/lineParticleRenderer.h b/panda/src/particlesystem/lineParticleRenderer.h index a07e04e9a8..ae37a833d5 100644 --- a/panda/src/particlesystem/lineParticleRenderer.h +++ b/panda/src/particlesystem/lineParticleRenderer.h @@ -32,9 +32,9 @@ class EXPCL_PANDAPHYSICS LineParticleRenderer : public BaseParticleRenderer { PUBLISHED: LineParticleRenderer(); LineParticleRenderer(const LineParticleRenderer& copy); - LineParticleRenderer(const LColor& head, - const LColor& tail, - ParticleRendererAlphaMode alpha_mode); + explicit LineParticleRenderer(const LColor& head, + const LColor& tail, + ParticleRendererAlphaMode alpha_mode); virtual ~LineParticleRenderer(); diff --git a/panda/src/particlesystem/particleSystem.h b/panda/src/particlesystem/particleSystem.h index 5411d8e35e..e2689cf361 100644 --- a/panda/src/particlesystem/particleSystem.h +++ b/panda/src/particlesystem/particleSystem.h @@ -41,7 +41,7 @@ class EXPCL_PANDAPHYSICS ParticleSystem : public Physical { PUBLISHED: // constructordestructor - ParticleSystem(int pool_size = 0); + explicit ParticleSystem(int pool_size = 0); ParticleSystem(const ParticleSystem& copy); ~ParticleSystem(); diff --git a/panda/src/particlesystem/particleSystemManager.h b/panda/src/particlesystem/particleSystemManager.h index 5ad7bc710f..1b03fdbc06 100644 --- a/panda/src/particlesystem/particleSystemManager.h +++ b/panda/src/particlesystem/particleSystemManager.h @@ -26,7 +26,7 @@ */ class EXPCL_PANDAPHYSICS ParticleSystemManager { PUBLISHED: - ParticleSystemManager(int every_nth_frame = 1); + explicit ParticleSystemManager(int every_nth_frame = 1); virtual ~ParticleSystemManager(); INLINE void set_frame_stepping(int every_nth_frame); diff --git a/panda/src/particlesystem/pointParticleRenderer.h b/panda/src/particlesystem/pointParticleRenderer.h index 4d1ee48f8c..3f7ed52612 100644 --- a/panda/src/particlesystem/pointParticleRenderer.h +++ b/panda/src/particlesystem/pointParticleRenderer.h @@ -39,12 +39,12 @@ PUBLISHED: }; PointParticleRenderer(const PointParticleRenderer& copy); - PointParticleRenderer(ParticleRendererAlphaMode ad = PR_ALPHA_NONE, - PN_stdfloat point_size = 1.0f, - PointParticleBlendType bt = PP_ONE_COLOR, - ParticleRendererBlendMethod bm = PP_NO_BLEND, - const LColor& sc = LColor(1.0f, 1.0f, 1.0f, 1.0f), - const LColor& ec = LColor(1.0f, 1.0f, 1.0f, 1.0f)); + explicit PointParticleRenderer(ParticleRendererAlphaMode ad = PR_ALPHA_NONE, + PN_stdfloat point_size = 1.0f, + PointParticleBlendType bt = PP_ONE_COLOR, + ParticleRendererBlendMethod bm = PP_NO_BLEND, + const LColor& sc = LColor(1.0f, 1.0f, 1.0f, 1.0f), + const LColor& ec = LColor(1.0f, 1.0f, 1.0f, 1.0f)); virtual ~PointParticleRenderer(); diff --git a/panda/src/particlesystem/sparkleParticleRenderer.h b/panda/src/particlesystem/sparkleParticleRenderer.h index ee5e85a860..367dd0029d 100644 --- a/panda/src/particlesystem/sparkleParticleRenderer.h +++ b/panda/src/particlesystem/sparkleParticleRenderer.h @@ -40,12 +40,12 @@ PUBLISHED: SparkleParticleRenderer(); SparkleParticleRenderer(const SparkleParticleRenderer& copy); - SparkleParticleRenderer(const LColor& center, - const LColor& edge, - PN_stdfloat birth_radius, - PN_stdfloat death_radius, - SparkleParticleLifeScale life_scale, - ParticleRendererAlphaMode alpha_mode); + explicit SparkleParticleRenderer(const LColor& center, + const LColor& edge, + PN_stdfloat birth_radius, + PN_stdfloat death_radius, + SparkleParticleLifeScale life_scale, + ParticleRendererAlphaMode alpha_mode); virtual ~SparkleParticleRenderer(); diff --git a/panda/src/particlesystem/spriteParticleRenderer.h b/panda/src/particlesystem/spriteParticleRenderer.h index e3f9ccc5d7..4ab65c02fb 100644 --- a/panda/src/particlesystem/spriteParticleRenderer.h +++ b/panda/src/particlesystem/spriteParticleRenderer.h @@ -153,7 +153,7 @@ private: */ class EXPCL_PANDAPHYSICS SpriteParticleRenderer : public BaseParticleRenderer { PUBLISHED: - SpriteParticleRenderer(Texture *tex = (Texture *) NULL); + explicit SpriteParticleRenderer(Texture *tex = (Texture *) NULL); SpriteParticleRenderer(const SpriteParticleRenderer ©); virtual ~SpriteParticleRenderer(); diff --git a/panda/src/pgraph/fog.h b/panda/src/pgraph/fog.h index 7a7831eb9e..3eb75603ba 100644 --- a/panda/src/pgraph/fog.h +++ b/panda/src/pgraph/fog.h @@ -40,7 +40,7 @@ class TransformState; */ class EXPCL_PANDA_PGRAPH Fog : public PandaNode { PUBLISHED: - Fog(const string &name); + explicit Fog(const string &name); protected: Fog(const Fog ©); diff --git a/panda/src/pgraph/lensNode.h b/panda/src/pgraph/lensNode.h index dead36fbe3..da9d9ef5f6 100644 --- a/panda/src/pgraph/lensNode.h +++ b/panda/src/pgraph/lensNode.h @@ -28,7 +28,7 @@ */ class EXPCL_PANDA_PGRAPH LensNode : public PandaNode { PUBLISHED: - LensNode(const string &name, Lens *lens = NULL); + explicit LensNode(const string &name, Lens *lens = NULL); protected: LensNode(const LensNode ©); diff --git a/panda/src/pgraph/loader.h b/panda/src/pgraph/loader.h index b39dc952cd..46de9ff8eb 100644 --- a/panda/src/pgraph/loader.h +++ b/panda/src/pgraph/loader.h @@ -70,7 +70,7 @@ PUBLISHED: Files _files; }; - Loader(const string &name = "loader"); + explicit Loader(const string &name = "loader"); INLINE void set_task_manager(AsyncTaskManager *task_manager); INLINE AsyncTaskManager *get_task_manager() const; diff --git a/panda/src/pgraph/modelFlattenRequest.h b/panda/src/pgraph/modelFlattenRequest.h index 08a6e72901..d3ff059482 100644 --- a/panda/src/pgraph/modelFlattenRequest.h +++ b/panda/src/pgraph/modelFlattenRequest.h @@ -32,7 +32,7 @@ public: ALLOC_DELETED_CHAIN(ModelFlattenRequest); PUBLISHED: - INLINE ModelFlattenRequest(PandaNode *orig); + INLINE explicit ModelFlattenRequest(PandaNode *orig); INLINE PandaNode *get_orig() const; diff --git a/panda/src/pgraph/modelLoadRequest.h b/panda/src/pgraph/modelLoadRequest.h index 423a807c38..946a9db503 100644 --- a/panda/src/pgraph/modelLoadRequest.h +++ b/panda/src/pgraph/modelLoadRequest.h @@ -34,10 +34,10 @@ public: ALLOC_DELETED_CHAIN(ModelLoadRequest); PUBLISHED: - ModelLoadRequest(const string &name, - const Filename &filename, - const LoaderOptions &options, - Loader *loader); + explicit ModelLoadRequest(const string &name, + const Filename &filename, + const LoaderOptions &options, + Loader *loader); INLINE const Filename &get_filename() const; INLINE const LoaderOptions &get_options() const; diff --git a/panda/src/pgraph/modelNode.h b/panda/src/pgraph/modelNode.h index aa4620f671..177f1cffb6 100644 --- a/panda/src/pgraph/modelNode.h +++ b/panda/src/pgraph/modelNode.h @@ -30,7 +30,7 @@ */ class EXPCL_PANDA_PGRAPH ModelNode : public PandaNode { PUBLISHED: - INLINE ModelNode(const string &name); + explicit INLINE ModelNode(const string &name); protected: INLINE ModelNode(const ModelNode ©); diff --git a/panda/src/pgraph/modelRoot.h b/panda/src/pgraph/modelRoot.h index bff0735abf..7895dcab85 100644 --- a/panda/src/pgraph/modelRoot.h +++ b/panda/src/pgraph/modelRoot.h @@ -26,8 +26,8 @@ */ class EXPCL_PANDA_PGRAPH ModelRoot : public ModelNode { PUBLISHED: - INLINE ModelRoot(const string &name); - INLINE ModelRoot(const Filename &fullpath, time_t timestamp); + INLINE explicit ModelRoot(const string &name); + INLINE explicit ModelRoot(const Filename &fullpath, time_t timestamp); INLINE int get_model_ref_count() const; MAKE_PROPERTY(model_ref_count, get_model_ref_count); diff --git a/panda/src/pgraph/modelSaveRequest.h b/panda/src/pgraph/modelSaveRequest.h index fb0ca6551b..5fe3c683ae 100644 --- a/panda/src/pgraph/modelSaveRequest.h +++ b/panda/src/pgraph/modelSaveRequest.h @@ -33,10 +33,10 @@ public: ALLOC_DELETED_CHAIN(ModelSaveRequest); PUBLISHED: - ModelSaveRequest(const string &name, - const Filename &filename, - const LoaderOptions &options, - PandaNode *node, Loader *loader); + explicit ModelSaveRequest(const string &name, + const Filename &filename, + const LoaderOptions &options, + PandaNode *node, Loader *loader); INLINE const Filename &get_filename() const; INLINE const LoaderOptions &get_options() const; diff --git a/panda/src/pgraph/occluderNode.h b/panda/src/pgraph/occluderNode.h index e9d8c67165..0bc4381f4d 100644 --- a/panda/src/pgraph/occluderNode.h +++ b/panda/src/pgraph/occluderNode.h @@ -30,7 +30,7 @@ */ class EXPCL_PANDA_PGRAPH OccluderNode : public PandaNode { PUBLISHED: - OccluderNode(const string &name); + explicit OccluderNode(const string &name); protected: OccluderNode(const OccluderNode ©); diff --git a/panda/src/pgraph/planeNode.h b/panda/src/pgraph/planeNode.h index 1c0a70c9ff..463fc39b22 100644 --- a/panda/src/pgraph/planeNode.h +++ b/panda/src/pgraph/planeNode.h @@ -35,7 +35,7 @@ */ class EXPCL_PANDA_PGRAPH PlaneNode : public PandaNode { PUBLISHED: - PlaneNode(const string &name, const LPlane &plane = LPlane()); + explicit PlaneNode(const string &name, const LPlane &plane = LPlane()); protected: PlaneNode(const PlaneNode ©); diff --git a/panda/src/pgraph/polylightNode.h b/panda/src/pgraph/polylightNode.h index 1b8c236e0b..cb01427e58 100644 --- a/panda/src/pgraph/polylightNode.h +++ b/panda/src/pgraph/polylightNode.h @@ -52,7 +52,7 @@ PUBLISHED: AQUADRATIC, }; - PolylightNode(const string &name); + explicit PolylightNode(const string &name); INLINE void enable(); INLINE void disable(); INLINE void set_pos(const LPoint3 &position); diff --git a/panda/src/pgraph/portalNode.h b/panda/src/pgraph/portalNode.h index 3b5c9ae7a3..fefe5b6bdb 100644 --- a/panda/src/pgraph/portalNode.h +++ b/panda/src/pgraph/portalNode.h @@ -29,8 +29,8 @@ */ class EXPCL_PANDA_PGRAPH PortalNode : public PandaNode { PUBLISHED: - PortalNode(const string &name); - PortalNode(const string &name, LPoint3 pos, PN_stdfloat scale=10.0); + explicit PortalNode(const string &name); + explicit PortalNode(const string &name, LPoint3 pos, PN_stdfloat scale=10.0); protected: PortalNode(const PortalNode ©); diff --git a/panda/src/pgraph/sceneGraphReducer.h b/panda/src/pgraph/sceneGraphReducer.h index 43bc38d3eb..5d9550856a 100644 --- a/panda/src/pgraph/sceneGraphReducer.h +++ b/panda/src/pgraph/sceneGraphReducer.h @@ -38,7 +38,7 @@ class PandaNode; */ class EXPCL_PANDA_PGRAPH SceneGraphReducer { PUBLISHED: - INLINE SceneGraphReducer(GraphicsStateGuardianBase *gsg = NULL); + INLINE explicit SceneGraphReducer(GraphicsStateGuardianBase *gsg = NULL); INLINE ~SceneGraphReducer(); enum AttribTypes { diff --git a/panda/src/pgraph/shaderInput.h b/panda/src/pgraph/shaderInput.h index 32fe514558..39a4e32fe8 100644 --- a/panda/src/pgraph/shaderInput.h +++ b/panda/src/pgraph/shaderInput.h @@ -90,8 +90,8 @@ public: ShaderInput(CPT_InternalName name, const NodePath &np, int priority=0); PUBLISHED: - ShaderInput(CPT_InternalName name, Texture *tex, bool read, bool write, int z=-1, int n=0, int priority=0); - ShaderInput(CPT_InternalName name, Texture *tex, const SamplerState &sampler, int priority=0); + explicit ShaderInput(CPT_InternalName name, Texture *tex, bool read, bool write, int z=-1, int n=0, int priority=0); + explicit ShaderInput(CPT_InternalName name, Texture *tex, const SamplerState &sampler, int priority=0); enum ShaderInputType { M_invalid = 0, diff --git a/panda/src/pgraphnodes/ambientLight.h b/panda/src/pgraphnodes/ambientLight.h index 23623d7afe..f3582e54fd 100644 --- a/panda/src/pgraphnodes/ambientLight.h +++ b/panda/src/pgraphnodes/ambientLight.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDA_PGRAPHNODES AmbientLight : public LightNode { PUBLISHED: - AmbientLight(const string &name); + explicit AmbientLight(const string &name); protected: AmbientLight(const AmbientLight ©); diff --git a/panda/src/pgraphnodes/callbackNode.h b/panda/src/pgraphnodes/callbackNode.h index 22f1f0f00b..ba2baec389 100644 --- a/panda/src/pgraphnodes/callbackNode.h +++ b/panda/src/pgraphnodes/callbackNode.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDA_PGRAPHNODES CallbackNode : public PandaNode { PUBLISHED: - CallbackNode(const string &name); + explicit CallbackNode(const string &name); INLINE void set_cull_callback(CallbackObject *object); INLINE void clear_cull_callback(); diff --git a/panda/src/pgraphnodes/computeNode.h b/panda/src/pgraphnodes/computeNode.h index 3210fba40f..ba649fb43f 100644 --- a/panda/src/pgraphnodes/computeNode.h +++ b/panda/src/pgraphnodes/computeNode.h @@ -26,7 +26,7 @@ */ class EXPCL_PANDA_PGRAPHNODES ComputeNode : public PandaNode { PUBLISHED: - ComputeNode(const string &name); + explicit ComputeNode(const string &name); INLINE void add_dispatch(const LVecBase3i &num_groups); INLINE void add_dispatch(int num_groups_x, int num_groups_y, int num_groups_z); diff --git a/panda/src/pgraphnodes/directionalLight.h b/panda/src/pgraphnodes/directionalLight.h index ea09627bd7..df2a198273 100644 --- a/panda/src/pgraphnodes/directionalLight.h +++ b/panda/src/pgraphnodes/directionalLight.h @@ -24,7 +24,7 @@ */ class EXPCL_PANDA_PGRAPHNODES DirectionalLight : public LightLensNode { PUBLISHED: - DirectionalLight(const string &name); + explicit DirectionalLight(const string &name); protected: DirectionalLight(const DirectionalLight ©); diff --git a/panda/src/pgraphnodes/fadeLodNode.h b/panda/src/pgraphnodes/fadeLodNode.h index 79930a39b4..728cc8f8e6 100644 --- a/panda/src/pgraphnodes/fadeLodNode.h +++ b/panda/src/pgraphnodes/fadeLodNode.h @@ -23,7 +23,7 @@ */ class EXPCL_PANDA_PGRAPHNODES FadeLODNode : public LODNode { PUBLISHED: - FadeLODNode(const string &name); + explicit FadeLODNode(const string &name); protected: FadeLODNode(const FadeLODNode ©); diff --git a/panda/src/pgraphnodes/lightLensNode.h b/panda/src/pgraphnodes/lightLensNode.h index 02dcd9bbff..2102acc541 100644 --- a/panda/src/pgraphnodes/lightLensNode.h +++ b/panda/src/pgraphnodes/lightLensNode.h @@ -32,7 +32,7 @@ class GraphicsStateGuardian; */ class EXPCL_PANDA_PGRAPHNODES LightLensNode : public Light, public Camera { PUBLISHED: - LightLensNode(const string &name, Lens *lens = new PerspectiveLens()); + explicit LightLensNode(const string &name, Lens *lens = new PerspectiveLens()); virtual ~LightLensNode(); INLINE bool has_specular_color() const; diff --git a/panda/src/pgraphnodes/lightNode.h b/panda/src/pgraphnodes/lightNode.h index 14ebbd378a..9e9187ebe0 100644 --- a/panda/src/pgraphnodes/lightNode.h +++ b/panda/src/pgraphnodes/lightNode.h @@ -26,7 +26,7 @@ */ class EXPCL_PANDA_PGRAPHNODES LightNode : public Light, public PandaNode { PUBLISHED: - LightNode(const string &name); + explicit LightNode(const string &name); protected: LightNode(const LightNode ©); diff --git a/panda/src/pgraphnodes/lodNode.h b/panda/src/pgraphnodes/lodNode.h index 6348b4c23a..7258ebe447 100644 --- a/panda/src/pgraphnodes/lodNode.h +++ b/panda/src/pgraphnodes/lodNode.h @@ -27,7 +27,7 @@ */ class EXPCL_PANDA_PGRAPHNODES LODNode : public PandaNode { PUBLISHED: - INLINE LODNode(const string &name); + INLINE explicit LODNode(const string &name); static PT(LODNode) make_default_lod(const string &name); diff --git a/panda/src/pgraphnodes/pointLight.h b/panda/src/pgraphnodes/pointLight.h index 1029e1d41d..cbfcf9b50d 100644 --- a/panda/src/pgraphnodes/pointLight.h +++ b/panda/src/pgraphnodes/pointLight.h @@ -24,7 +24,7 @@ */ class EXPCL_PANDA_PGRAPHNODES PointLight : public LightLensNode { PUBLISHED: - PointLight(const string &name); + explicit PointLight(const string &name); protected: PointLight(const PointLight ©); diff --git a/panda/src/pgraphnodes/rectangleLight.h b/panda/src/pgraphnodes/rectangleLight.h index 00d4d586ea..3870b4f8f7 100644 --- a/panda/src/pgraphnodes/rectangleLight.h +++ b/panda/src/pgraphnodes/rectangleLight.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDA_PGRAPHNODES RectangleLight : public LightLensNode { PUBLISHED: - RectangleLight(const string &name); + explicit RectangleLight(const string &name); protected: RectangleLight(const RectangleLight ©); diff --git a/panda/src/pgraphnodes/selectiveChildNode.h b/panda/src/pgraphnodes/selectiveChildNode.h index 2175c5d13f..76720aa933 100644 --- a/panda/src/pgraphnodes/selectiveChildNode.h +++ b/panda/src/pgraphnodes/selectiveChildNode.h @@ -24,7 +24,7 @@ */ class EXPCL_PANDA_PGRAPHNODES SelectiveChildNode : public PandaNode { PUBLISHED: - INLINE SelectiveChildNode(const string &name); + INLINE explicit SelectiveChildNode(const string &name); protected: INLINE SelectiveChildNode(const SelectiveChildNode ©); diff --git a/panda/src/pgraphnodes/sequenceNode.h b/panda/src/pgraphnodes/sequenceNode.h index 13a7a826fa..ce05b792f2 100644 --- a/panda/src/pgraphnodes/sequenceNode.h +++ b/panda/src/pgraphnodes/sequenceNode.h @@ -26,7 +26,7 @@ */ class EXPCL_PANDA_PGRAPHNODES SequenceNode : public SelectiveChildNode, public AnimInterface { PUBLISHED: - INLINE SequenceNode(const string &name); + INLINE explicit SequenceNode(const string &name); protected: SequenceNode(const SequenceNode ©); diff --git a/panda/src/pgraphnodes/sphereLight.h b/panda/src/pgraphnodes/sphereLight.h index 4e4c885f7c..7efddb9b50 100644 --- a/panda/src/pgraphnodes/sphereLight.h +++ b/panda/src/pgraphnodes/sphereLight.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDA_PGRAPHNODES SphereLight : public PointLight { PUBLISHED: - SphereLight(const string &name); + explicit SphereLight(const string &name); protected: SphereLight(const SphereLight ©); diff --git a/panda/src/pgraphnodes/switchNode.h b/panda/src/pgraphnodes/switchNode.h index eca88dd541..b2fefd7750 100644 --- a/panda/src/pgraphnodes/switchNode.h +++ b/panda/src/pgraphnodes/switchNode.h @@ -24,7 +24,7 @@ */ class EXPCL_PANDA_PGRAPHNODES SwitchNode : public SelectiveChildNode { PUBLISHED: - INLINE SwitchNode(const string &name); + INLINE explicit SwitchNode(const string &name); public: SwitchNode(const SwitchNode ©); diff --git a/panda/src/pgraphnodes/uvScrollNode.h b/panda/src/pgraphnodes/uvScrollNode.h index 8e59f335e6..10dff152b7 100644 --- a/panda/src/pgraphnodes/uvScrollNode.h +++ b/panda/src/pgraphnodes/uvScrollNode.h @@ -25,8 +25,8 @@ */ class EXPCL_PANDA_PGRAPH UvScrollNode : public PandaNode { PUBLISHED: - INLINE UvScrollNode(const string &name, PN_stdfloat u_speed, PN_stdfloat v_speed, PN_stdfloat w_speed, PN_stdfloat r_speed); - INLINE UvScrollNode(const string &name); + INLINE explicit UvScrollNode(const string &name, PN_stdfloat u_speed, PN_stdfloat v_speed, PN_stdfloat w_speed, PN_stdfloat r_speed); + INLINE explicit UvScrollNode(const string &name); protected: INLINE UvScrollNode(const UvScrollNode ©); diff --git a/panda/src/pgui/pgButton.h b/panda/src/pgui/pgButton.h index ce0cb315c4..ece2359762 100644 --- a/panda/src/pgui/pgButton.h +++ b/panda/src/pgui/pgButton.h @@ -28,7 +28,7 @@ */ class EXPCL_PANDA_PGUI PGButton : public PGItem { PUBLISHED: - PGButton(const string &name); + explicit PGButton(const string &name); virtual ~PGButton(); protected: diff --git a/panda/src/pgui/pgEntry.h b/panda/src/pgui/pgEntry.h index 3d764edf7f..88fd5aaa89 100644 --- a/panda/src/pgui/pgEntry.h +++ b/panda/src/pgui/pgEntry.h @@ -36,7 +36,7 @@ */ class EXPCL_PANDA_PGUI PGEntry : public PGItem { PUBLISHED: - PGEntry(const string &name); + explicit PGEntry(const string &name); virtual ~PGEntry(); protected: diff --git a/panda/src/pgui/pgItem.h b/panda/src/pgui/pgItem.h index 003d1fa0c5..c39103154a 100644 --- a/panda/src/pgui/pgItem.h +++ b/panda/src/pgui/pgItem.h @@ -52,7 +52,7 @@ class ScissorAttrib; */ class EXPCL_PANDA_PGUI PGItem : public PandaNode { PUBLISHED: - PGItem(const string &name); + explicit PGItem(const string &name); virtual ~PGItem(); INLINE void set_name(const string &name); diff --git a/panda/src/pgui/pgScrollFrame.h b/panda/src/pgui/pgScrollFrame.h index 9847852b1f..7dfae33d1b 100644 --- a/panda/src/pgui/pgScrollFrame.h +++ b/panda/src/pgui/pgScrollFrame.h @@ -34,7 +34,7 @@ */ class EXPCL_PANDA_PGUI PGScrollFrame : public PGVirtualFrame, public PGSliderBarNotify { PUBLISHED: - PGScrollFrame(const string &name = ""); + explicit PGScrollFrame(const string &name = ""); virtual ~PGScrollFrame(); protected: diff --git a/panda/src/pgui/pgSliderBar.h b/panda/src/pgui/pgSliderBar.h index c2b3a90b81..c08a98e172 100644 --- a/panda/src/pgui/pgSliderBar.h +++ b/panda/src/pgui/pgSliderBar.h @@ -30,7 +30,7 @@ */ class EXPCL_PANDA_PGUI PGSliderBar : public PGItem, public PGButtonNotify { PUBLISHED: - PGSliderBar(const string &name = ""); + explicit PGSliderBar(const string &name = ""); virtual ~PGSliderBar(); protected: diff --git a/panda/src/pgui/pgTop.h b/panda/src/pgui/pgTop.h index ead4cce12f..45376e99f5 100644 --- a/panda/src/pgui/pgTop.h +++ b/panda/src/pgui/pgTop.h @@ -37,7 +37,7 @@ class PGMouseWatcherGroup; */ class EXPCL_PANDA_PGUI PGTop : public PandaNode { PUBLISHED: - PGTop(const string &name); + explicit PGTop(const string &name); virtual ~PGTop(); protected: diff --git a/panda/src/pgui/pgVirtualFrame.h b/panda/src/pgui/pgVirtualFrame.h index f0f90d85d3..d6505faaaa 100644 --- a/panda/src/pgui/pgVirtualFrame.h +++ b/panda/src/pgui/pgVirtualFrame.h @@ -42,7 +42,7 @@ class TransformState; */ class EXPCL_PANDA_PGUI PGVirtualFrame : public PGItem { PUBLISHED: - PGVirtualFrame(const string &name = ""); + explicit PGVirtualFrame(const string &name = ""); virtual ~PGVirtualFrame(); protected: diff --git a/panda/src/pgui/pgWaitBar.h b/panda/src/pgui/pgWaitBar.h index c4a5359be5..92381870dd 100644 --- a/panda/src/pgui/pgWaitBar.h +++ b/panda/src/pgui/pgWaitBar.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDA_PGUI PGWaitBar : public PGItem { PUBLISHED: - PGWaitBar(const string &name = ""); + explicit PGWaitBar(const string &name = ""); virtual ~PGWaitBar(); protected: diff --git a/panda/src/physics/actorNode.h b/panda/src/physics/actorNode.h index 2f3690543a..aacdec669e 100644 --- a/panda/src/physics/actorNode.h +++ b/panda/src/physics/actorNode.h @@ -25,7 +25,7 @@ */ class EXPCL_PANDAPHYSICS ActorNode : public PhysicalNode { PUBLISHED: - ActorNode(const string &name = ""); + explicit ActorNode(const string &name = ""); ActorNode(const ActorNode ©); virtual ~ActorNode(); diff --git a/panda/src/physics/angularVectorForce.h b/panda/src/physics/angularVectorForce.h index edb2cf8994..aab32eaaae 100644 --- a/panda/src/physics/angularVectorForce.h +++ b/panda/src/physics/angularVectorForce.h @@ -22,8 +22,8 @@ */ class EXPCL_PANDAPHYSICS AngularVectorForce : public AngularForce { PUBLISHED: - AngularVectorForce(const LRotation& quat); - AngularVectorForce(PN_stdfloat h, PN_stdfloat p, PN_stdfloat r); + explicit AngularVectorForce(const LRotation& quat); + explicit AngularVectorForce(PN_stdfloat h, PN_stdfloat p, PN_stdfloat r); AngularVectorForce(const AngularVectorForce ©); virtual ~AngularVectorForce(); diff --git a/panda/src/physics/forceNode.h b/panda/src/physics/forceNode.h index 574987ff1a..0c800ab16f 100644 --- a/panda/src/physics/forceNode.h +++ b/panda/src/physics/forceNode.h @@ -26,7 +26,7 @@ */ class EXPCL_PANDAPHYSICS ForceNode : public PandaNode { PUBLISHED: - ForceNode(const string &name); + explicit ForceNode(const string &name); INLINE void clear(); INLINE BaseForce *get_force(size_t index) const; INLINE size_t get_num_forces() const; diff --git a/panda/src/physics/linearControlForce.h b/panda/src/physics/linearControlForce.h index 3d9e889130..d39a9c2581 100644 --- a/panda/src/physics/linearControlForce.h +++ b/panda/src/physics/linearControlForce.h @@ -24,8 +24,8 @@ */ class EXPCL_PANDAPHYSICS LinearControlForce : public LinearForce { PUBLISHED: - LinearControlForce(const PhysicsObject *po = 0, PN_stdfloat a = 1.0f, - bool mass = false); + explicit LinearControlForce(const PhysicsObject *po = 0, PN_stdfloat a = 1.0f, + bool mass = false); LinearControlForce(const LinearControlForce ©); virtual ~LinearControlForce(); diff --git a/panda/src/physics/linearCylinderVortexForce.h b/panda/src/physics/linearCylinderVortexForce.h index 14fc911811..5698aa9d8d 100644 --- a/panda/src/physics/linearCylinderVortexForce.h +++ b/panda/src/physics/linearCylinderVortexForce.h @@ -25,11 +25,11 @@ */ class EXPCL_PANDAPHYSICS LinearCylinderVortexForce : public LinearForce { PUBLISHED: - LinearCylinderVortexForce(PN_stdfloat radius = 1.0f, - PN_stdfloat length = 0.0f, - PN_stdfloat coef = 1.0f, - PN_stdfloat a = 1.0f, - bool md = false); + explicit LinearCylinderVortexForce(PN_stdfloat radius = 1.0f, + PN_stdfloat length = 0.0f, + PN_stdfloat coef = 1.0f, + PN_stdfloat a = 1.0f, + bool md = false); LinearCylinderVortexForce(const LinearCylinderVortexForce ©); virtual ~LinearCylinderVortexForce(); diff --git a/panda/src/physics/linearFrictionForce.h b/panda/src/physics/linearFrictionForce.h index af11e73b4a..8ba4d19534 100644 --- a/panda/src/physics/linearFrictionForce.h +++ b/panda/src/physics/linearFrictionForce.h @@ -21,7 +21,7 @@ */ class EXPCL_PANDAPHYSICS LinearFrictionForce : public LinearForce { PUBLISHED: - LinearFrictionForce(PN_stdfloat coef = 1.0f, PN_stdfloat a = 1.0f, bool m = false); + explicit LinearFrictionForce(PN_stdfloat coef = 1.0f, PN_stdfloat a = 1.0f, bool m = false); LinearFrictionForce(const LinearFrictionForce ©); virtual ~LinearFrictionForce(); diff --git a/panda/src/physics/linearJitterForce.h b/panda/src/physics/linearJitterForce.h index bfba75315d..076d7d12ca 100644 --- a/panda/src/physics/linearJitterForce.h +++ b/panda/src/physics/linearJitterForce.h @@ -22,7 +22,7 @@ */ class EXPCL_PANDAPHYSICS LinearJitterForce : public LinearRandomForce { PUBLISHED: - LinearJitterForce(PN_stdfloat a = 1.0f, bool m = false); + explicit LinearJitterForce(PN_stdfloat a = 1.0f, bool m = false); LinearJitterForce(const LinearJitterForce ©); virtual ~LinearJitterForce(); diff --git a/panda/src/physics/linearNoiseForce.h b/panda/src/physics/linearNoiseForce.h index b0c47b56ea..b87fec2256 100644 --- a/panda/src/physics/linearNoiseForce.h +++ b/panda/src/physics/linearNoiseForce.h @@ -23,7 +23,7 @@ */ class EXPCL_PANDAPHYSICS LinearNoiseForce : public LinearRandomForce { PUBLISHED: - LinearNoiseForce(PN_stdfloat a = 1.0f, bool m = false); + explicit LinearNoiseForce(PN_stdfloat a = 1.0f, bool m = false); LinearNoiseForce(const LinearNoiseForce ©); virtual ~LinearNoiseForce(); diff --git a/panda/src/physics/linearSinkForce.h b/panda/src/physics/linearSinkForce.h index 00b3d5008c..42f158d184 100644 --- a/panda/src/physics/linearSinkForce.h +++ b/panda/src/physics/linearSinkForce.h @@ -21,8 +21,8 @@ */ class EXPCL_PANDAPHYSICS LinearSinkForce : public LinearDistanceForce { PUBLISHED: - LinearSinkForce(const LPoint3& p, FalloffType f, PN_stdfloat r, PN_stdfloat a = 1.0f, - bool m = true); + explicit LinearSinkForce(const LPoint3& p, FalloffType f, PN_stdfloat r, + PN_stdfloat a = 1.0f, bool m = true); LinearSinkForce(); LinearSinkForce(const LinearSinkForce ©); virtual ~LinearSinkForce(); diff --git a/panda/src/physics/linearSourceForce.h b/panda/src/physics/linearSourceForce.h index 9285a15780..f6b2358c22 100644 --- a/panda/src/physics/linearSourceForce.h +++ b/panda/src/physics/linearSourceForce.h @@ -21,8 +21,8 @@ */ class EXPCL_PANDAPHYSICS LinearSourceForce : public LinearDistanceForce { PUBLISHED: - LinearSourceForce(const LPoint3& p, FalloffType f, PN_stdfloat r, PN_stdfloat a = 1.0f, - bool mass = true); + explicit LinearSourceForce(const LPoint3& p, FalloffType f, PN_stdfloat r, + PN_stdfloat a = 1.0f, bool mass = true); LinearSourceForce(); LinearSourceForce(const LinearSourceForce ©); virtual ~LinearSourceForce(); diff --git a/panda/src/physics/linearUserDefinedForce.h b/panda/src/physics/linearUserDefinedForce.h index fea6612de8..3f05b1ea77 100644 --- a/panda/src/physics/linearUserDefinedForce.h +++ b/panda/src/physics/linearUserDefinedForce.h @@ -21,9 +21,8 @@ */ class EXPCL_PANDAPHYSICS LinearUserDefinedForce : public LinearForce { PUBLISHED: - LinearUserDefinedForce(LVector3 (*proc)(const PhysicsObject *) = NULL, - PN_stdfloat a = 1.0f, - bool md = false); + explicit LinearUserDefinedForce(LVector3 (*proc)(const PhysicsObject *) = NULL, + PN_stdfloat a = 1.0f, bool md = false); LinearUserDefinedForce(const LinearUserDefinedForce ©); virtual ~LinearUserDefinedForce(); diff --git a/panda/src/physics/linearVectorForce.h b/panda/src/physics/linearVectorForce.h index 59adca06cb..ca12ab6bc5 100644 --- a/panda/src/physics/linearVectorForce.h +++ b/panda/src/physics/linearVectorForce.h @@ -22,10 +22,10 @@ */ class EXPCL_PANDAPHYSICS LinearVectorForce : public LinearForce { PUBLISHED: - LinearVectorForce(const LVector3& vec, PN_stdfloat a = 1.0f, bool mass = false); + explicit LinearVectorForce(const LVector3& vec, PN_stdfloat a = 1.0f, bool mass = false); + explicit LinearVectorForce(PN_stdfloat x = 0.0f, PN_stdfloat y = 0.0f, PN_stdfloat z = 0.0f, + PN_stdfloat a = 1.0f, bool mass = false); LinearVectorForce(const LinearVectorForce ©); - LinearVectorForce(PN_stdfloat x = 0.0f, PN_stdfloat y = 0.0f, PN_stdfloat z = 0.0f, - PN_stdfloat a = 1.0f, bool mass = false); virtual ~LinearVectorForce(); INLINE void set_vector(const LVector3& v); diff --git a/panda/src/physics/physical.h b/panda/src/physics/physical.h index 0a9ca1d07c..64550823af 100644 --- a/panda/src/physics/physical.h +++ b/panda/src/physics/physical.h @@ -41,7 +41,7 @@ public: typedef pvector AngularForceVector; PUBLISHED: - Physical(int total_objects = 1, bool pre_alloc = false); + explicit Physical(int total_objects = 1, bool pre_alloc = false); Physical(const Physical& copy); virtual ~Physical(); diff --git a/panda/src/physics/physicalNode.h b/panda/src/physics/physicalNode.h index 5ab9f36372..cb9e5e54b9 100644 --- a/panda/src/physics/physicalNode.h +++ b/panda/src/physics/physicalNode.h @@ -27,7 +27,7 @@ */ class EXPCL_PANDAPHYSICS PhysicalNode : public PandaNode { PUBLISHED: - PhysicalNode(const string &name); + explicit PhysicalNode(const string &name); INLINE void clear(); INLINE Physical *get_physical(size_t index) const; INLINE size_t get_num_physicals() const; diff --git a/panda/src/physx/physxClothNode.h b/panda/src/physx/physxClothNode.h index 7c9c887092..4f2535b949 100644 --- a/panda/src/physx/physxClothNode.h +++ b/panda/src/physx/physxClothNode.h @@ -31,9 +31,8 @@ class PhysxCloth; * Renderable geometry which represents a cloth mesh. */ class EXPCL_PANDAPHYSX PhysxClothNode : public GeomNode { - PUBLISHED: - INLINE PhysxClothNode(const char *name); + INLINE explicit PhysxClothNode(const char *name); INLINE ~PhysxClothNode(); bool set_texcoords(const Filename &filename); diff --git a/panda/src/physx/physxSoftBodyNode.h b/panda/src/physx/physxSoftBodyNode.h index df2af11e71..8f6cba7ba1 100644 --- a/panda/src/physx/physxSoftBodyNode.h +++ b/panda/src/physx/physxSoftBodyNode.h @@ -31,9 +31,8 @@ class PhysxSoftBody; * Renderable geometry which represents a soft body mesh. */ class EXPCL_PANDAPHYSX PhysxSoftBodyNode : public GeomNode { - PUBLISHED: - INLINE PhysxSoftBodyNode(const char *name); + INLINE explicit PhysxSoftBodyNode(const char *name); INLINE ~PhysxSoftBodyNode(); void set_from_geom(const Geom *geom); diff --git a/panda/src/pipeline/conditionVar.h b/panda/src/pipeline/conditionVar.h index ece37ba6f2..3c94e03a34 100644 --- a/panda/src/pipeline/conditionVar.h +++ b/panda/src/pipeline/conditionVar.h @@ -42,7 +42,7 @@ class EXPCL_PANDA_PIPELINE ConditionVar : public ConditionVarDirect #endif // DEBUG_THREADS { PUBLISHED: - INLINE ConditionVar(Mutex &mutex); + INLINE explicit ConditionVar(Mutex &mutex); INLINE ~ConditionVar(); private: INLINE ConditionVar(const ConditionVar ©); diff --git a/panda/src/pipeline/conditionVarDebug.h b/panda/src/pipeline/conditionVarDebug.h index 45754ffdea..7cbacbaf0d 100644 --- a/panda/src/pipeline/conditionVarDebug.h +++ b/panda/src/pipeline/conditionVarDebug.h @@ -31,7 +31,7 @@ */ class EXPCL_PANDA_PIPELINE ConditionVarDebug { public: - ConditionVarDebug(MutexDebug &mutex); + explicit ConditionVarDebug(MutexDebug &mutex); virtual ~ConditionVarDebug(); private: INLINE ConditionVarDebug(const ConditionVarDebug ©); diff --git a/panda/src/pipeline/conditionVarDirect.h b/panda/src/pipeline/conditionVarDirect.h index 508a7c2bdf..116f22b899 100644 --- a/panda/src/pipeline/conditionVarDirect.h +++ b/panda/src/pipeline/conditionVarDirect.h @@ -31,7 +31,7 @@ */ class EXPCL_PANDA_PIPELINE ConditionVarDirect { public: - INLINE ConditionVarDirect(MutexDirect &mutex); + INLINE explicit ConditionVarDirect(MutexDirect &mutex); INLINE ~ConditionVarDirect(); private: INLINE ConditionVarDirect(const ConditionVarDirect ©); diff --git a/panda/src/pipeline/conditionVarFull.h b/panda/src/pipeline/conditionVarFull.h index df25a717a9..5f8b7ea731 100644 --- a/panda/src/pipeline/conditionVarFull.h +++ b/panda/src/pipeline/conditionVarFull.h @@ -45,7 +45,7 @@ class EXPCL_PANDA_PIPELINE ConditionVarFull : public ConditionVarFullDirect #endif // DEBUG_THREADS { PUBLISHED: - INLINE ConditionVarFull(Mutex &mutex); + INLINE explicit ConditionVarFull(Mutex &mutex); INLINE ~ConditionVarFull(); private: INLINE ConditionVarFull(const ConditionVarFull ©); diff --git a/panda/src/pipeline/conditionVarFullDebug.h b/panda/src/pipeline/conditionVarFullDebug.h index 83e36dd809..02c5957f72 100644 --- a/panda/src/pipeline/conditionVarFullDebug.h +++ b/panda/src/pipeline/conditionVarFullDebug.h @@ -31,7 +31,7 @@ */ class EXPCL_PANDA_PIPELINE ConditionVarFullDebug { public: - ConditionVarFullDebug(MutexDebug &mutex); + explicit ConditionVarFullDebug(MutexDebug &mutex); virtual ~ConditionVarFullDebug(); private: INLINE ConditionVarFullDebug(const ConditionVarFullDebug ©); diff --git a/panda/src/pipeline/conditionVarFullDirect.h b/panda/src/pipeline/conditionVarFullDirect.h index 79a069e2de..45cd0ac3f4 100644 --- a/panda/src/pipeline/conditionVarFullDirect.h +++ b/panda/src/pipeline/conditionVarFullDirect.h @@ -31,7 +31,7 @@ */ class EXPCL_PANDA_PIPELINE ConditionVarFullDirect { public: - INLINE ConditionVarFullDirect(MutexDirect &mutex); + INLINE explicit ConditionVarFullDirect(MutexDirect &mutex); INLINE ~ConditionVarFullDirect(); private: INLINE ConditionVarFullDirect(const ConditionVarFullDirect ©); diff --git a/panda/src/pipeline/lightMutex.h b/panda/src/pipeline/lightMutex.h index ad24cfb1e8..77ad4b26ae 100644 --- a/panda/src/pipeline/lightMutex.h +++ b/panda/src/pipeline/lightMutex.h @@ -42,9 +42,9 @@ class EXPCL_PANDA_PIPELINE LightMutex : public LightMutexDirect PUBLISHED: INLINE LightMutex(); public: - INLINE LightMutex(const char *name); + INLINE explicit LightMutex(const char *name); PUBLISHED: - INLINE LightMutex(const string &name); + INLINE explicit LightMutex(const string &name); INLINE ~LightMutex(); private: INLINE LightMutex(const LightMutex ©); diff --git a/panda/src/pipeline/lightReMutex.h b/panda/src/pipeline/lightReMutex.h index 5ae93f4faa..6959c4ab17 100644 --- a/panda/src/pipeline/lightReMutex.h +++ b/panda/src/pipeline/lightReMutex.h @@ -33,9 +33,9 @@ class EXPCL_PANDA_PIPELINE LightReMutex : public LightReMutexDirect PUBLISHED: INLINE LightReMutex(); public: - INLINE LightReMutex(const char *name); + INLINE explicit LightReMutex(const char *name); PUBLISHED: - INLINE LightReMutex(const string &name); + INLINE explicit LightReMutex(const string &name); INLINE ~LightReMutex(); private: INLINE LightReMutex(const LightReMutex ©); diff --git a/panda/src/pipeline/pmutex.h b/panda/src/pipeline/pmutex.h index ef9e653027..c5d471ae0c 100644 --- a/panda/src/pipeline/pmutex.h +++ b/panda/src/pipeline/pmutex.h @@ -43,7 +43,7 @@ PUBLISHED: public: INLINE Mutex(const char *name); PUBLISHED: - INLINE Mutex(const string &name); + INLINE explicit Mutex(const string &name); INLINE ~Mutex(); private: INLINE Mutex(const Mutex ©); diff --git a/panda/src/pipeline/psemaphore.h b/panda/src/pipeline/psemaphore.h index 229320ab84..6fd9162cc2 100644 --- a/panda/src/pipeline/psemaphore.h +++ b/panda/src/pipeline/psemaphore.h @@ -29,7 +29,7 @@ */ class EXPCL_PANDA_PIPELINE Semaphore { PUBLISHED: - INLINE Semaphore(int initial_count = 1); + INLINE explicit Semaphore(int initial_count = 1); INLINE ~Semaphore(); private: INLINE Semaphore(const Semaphore ©); diff --git a/panda/src/pipeline/pythonThread.h b/panda/src/pipeline/pythonThread.h index ea3adc2ac2..66b7e45aa4 100644 --- a/panda/src/pipeline/pythonThread.h +++ b/panda/src/pipeline/pythonThread.h @@ -26,8 +26,8 @@ */ class PythonThread : public Thread { PUBLISHED: - PythonThread(PyObject *function, PyObject *args, - const string &name, const string &sync_name); + explicit PythonThread(PyObject *function, PyObject *args, + const string &name, const string &sync_name); virtual ~PythonThread(); BLOCKING PyObject *join(); diff --git a/panda/src/pipeline/reMutex.h b/panda/src/pipeline/reMutex.h index 7a54847388..fd6a710b55 100644 --- a/panda/src/pipeline/reMutex.h +++ b/panda/src/pipeline/reMutex.h @@ -35,9 +35,9 @@ class EXPCL_PANDA_PIPELINE ReMutex : public ReMutexDirect PUBLISHED: INLINE ReMutex(); public: - INLINE ReMutex(const char *name); + INLINE explicit ReMutex(const char *name); PUBLISHED: - INLINE ReMutex(const string &name); + INLINE explicit ReMutex(const string &name); INLINE ~ReMutex(); private: INLINE ReMutex(const ReMutex ©); diff --git a/panda/src/pnmimage/pnmPainter.h b/panda/src/pnmimage/pnmPainter.h index 6abdb1cefa..a6192f621b 100644 --- a/panda/src/pnmimage/pnmPainter.h +++ b/panda/src/pnmimage/pnmPainter.h @@ -29,7 +29,7 @@ class PNMImage; */ class EXPCL_PANDA_PNMIMAGE PNMPainter { PUBLISHED: - PNMPainter(PNMImage &image, int xo = 0, int yo = 0); + explicit PNMPainter(PNMImage &image, int xo = 0, int yo = 0); INLINE ~PNMPainter(); INLINE void set_pen(PNMBrush *pen); diff --git a/panda/src/pnmtext/pnmTextGlyph.h b/panda/src/pnmtext/pnmTextGlyph.h index 8042fddc2a..d6075c4291 100644 --- a/panda/src/pnmtext/pnmTextGlyph.h +++ b/panda/src/pnmtext/pnmTextGlyph.h @@ -24,7 +24,7 @@ */ class EXPCL_PANDA_PNMTEXT PNMTextGlyph { PUBLISHED: - PNMTextGlyph(double advance); + explicit PNMTextGlyph(double advance); ~PNMTextGlyph(); INLINE int get_advance() const; diff --git a/panda/src/pnmtext/pnmTextMaker.h b/panda/src/pnmtext/pnmTextMaker.h index 662341c16c..4ae8f04069 100644 --- a/panda/src/pnmtext/pnmTextMaker.h +++ b/panda/src/pnmtext/pnmTextMaker.h @@ -34,10 +34,10 @@ class PNMTextGlyph; */ class EXPCL_PANDA_PNMTEXT PNMTextMaker : public FreetypeFont { PUBLISHED: - PNMTextMaker(const Filename &font_filename, int face_index); - PNMTextMaker(const char *font_data, int data_length, int face_index); + explicit PNMTextMaker(const Filename &font_filename, int face_index); + explicit PNMTextMaker(const char *font_data, int data_length, int face_index); + explicit PNMTextMaker(const FreetypeFont ©); PNMTextMaker(const PNMTextMaker ©); - PNMTextMaker(const FreetypeFont ©); ~PNMTextMaker(); enum Alignment { diff --git a/panda/src/pstatclient/pStatCollector.h b/panda/src/pstatclient/pStatCollector.h index 4bcd92d55a..6c265f5e0c 100644 --- a/panda/src/pstatclient/pStatCollector.h +++ b/panda/src/pstatclient/pStatCollector.h @@ -50,10 +50,10 @@ public: INLINE PStatCollector(); PUBLISHED: - INLINE PStatCollector(const string &name, - PStatClient *client = NULL); - INLINE PStatCollector(const PStatCollector &parent, - const string &name); + INLINE explicit PStatCollector(const string &name, + PStatClient *client = NULL); + INLINE explicit PStatCollector(const PStatCollector &parent, + const string &name); INLINE PStatCollector(const PStatCollector ©); INLINE void operator = (const PStatCollector ©); diff --git a/panda/src/putil/bamReader.h b/panda/src/putil/bamReader.h index 4785a4d4fc..bf88ced2af 100644 --- a/panda/src/putil/bamReader.h +++ b/panda/src/putil/bamReader.h @@ -115,7 +115,7 @@ public: PUBLISHED: // The primary interface for a caller. - BamReader(DatagramGenerator *source = NULL); + explicit BamReader(DatagramGenerator *source = NULL); ~BamReader(); void set_source(DatagramGenerator *source); diff --git a/panda/src/putil/bamWriter.h b/panda/src/putil/bamWriter.h index 3436457e9e..c2b04b3757 100644 --- a/panda/src/putil/bamWriter.h +++ b/panda/src/putil/bamWriter.h @@ -62,7 +62,7 @@ */ class EXPCL_PANDA_PUTIL BamWriter : public BamEnums { PUBLISHED: - BamWriter(DatagramSink *target = NULL); + explicit BamWriter(DatagramSink *target = NULL); ~BamWriter(); void set_target(DatagramSink *target); diff --git a/panda/src/putil/uniqueIdAllocator.h b/panda/src/putil/uniqueIdAllocator.h index 90efcaee69..54da7c6463 100644 --- a/panda/src/putil/uniqueIdAllocator.h +++ b/panda/src/putil/uniqueIdAllocator.h @@ -37,7 +37,7 @@ */ class EXPCL_PANDA_PUTIL UniqueIdAllocator { PUBLISHED: - UniqueIdAllocator(uint32_t min=0, uint32_t max=20); + explicit UniqueIdAllocator(uint32_t min=0, uint32_t max=20); ~UniqueIdAllocator(); uint32_t allocate(); diff --git a/panda/src/recorder/mouseRecorder.h b/panda/src/recorder/mouseRecorder.h index b97df0b7ed..f43150c2b8 100644 --- a/panda/src/recorder/mouseRecorder.h +++ b/panda/src/recorder/mouseRecorder.h @@ -33,7 +33,7 @@ class BamWriter; */ class EXPCL_PANDA_RECORDER MouseRecorder : public DataNode, public RecorderBase { PUBLISHED: - MouseRecorder(const string &name); + explicit MouseRecorder(const string &name); virtual ~MouseRecorder(); public: diff --git a/panda/src/recorder/socketStreamRecorder.h b/panda/src/recorder/socketStreamRecorder.h index 26f39047c4..3b43f5ffcd 100644 --- a/panda/src/recorder/socketStreamRecorder.h +++ b/panda/src/recorder/socketStreamRecorder.h @@ -41,7 +41,7 @@ class EXPCL_PANDA_RECORDER SocketStreamRecorder : public RecorderBase, public ReferenceCount { PUBLISHED: INLINE SocketStreamRecorder(); - INLINE SocketStreamRecorder(SocketStream *stream, bool owns_stream); + INLINE explicit SocketStreamRecorder(SocketStream *stream, bool owns_stream); INLINE ~SocketStreamRecorder(); bool receive_datagram(Datagram &dg); diff --git a/panda/src/speedtree/speedTreeNode.h b/panda/src/speedtree/speedTreeNode.h index 76a4d16a5e..567cb00af9 100644 --- a/panda/src/speedtree/speedTreeNode.h +++ b/panda/src/speedtree/speedTreeNode.h @@ -85,7 +85,7 @@ PUBLISHED: }; PUBLISHED: - SpeedTreeNode(const string &name); + explicit SpeedTreeNode(const string &name); virtual ~SpeedTreeNode(); INLINE bool is_valid() const; diff --git a/panda/src/text/textAssembler.h b/panda/src/text/textAssembler.h index 3b45d729b1..52195f8f69 100644 --- a/panda/src/text/textAssembler.h +++ b/panda/src/text/textAssembler.h @@ -42,7 +42,7 @@ class TextAssembler; */ class EXPCL_PANDA_TEXT TextAssembler { PUBLISHED: - TextAssembler(TextEncoder *encoder); + explicit TextAssembler(TextEncoder *encoder); TextAssembler(const TextAssembler ©); void operator = (const TextAssembler ©); ~TextAssembler(); diff --git a/panda/src/text/textGraphic.h b/panda/src/text/textGraphic.h index a3d268cd8c..d8a3e1a476 100644 --- a/panda/src/text/textGraphic.h +++ b/panda/src/text/textGraphic.h @@ -37,8 +37,8 @@ class EXPCL_PANDA_TEXT TextGraphic { PUBLISHED: INLINE TextGraphic(); - INLINE TextGraphic(const NodePath &model, const LVecBase4 &frame); - INLINE TextGraphic(const NodePath &model, PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top); + INLINE explicit TextGraphic(const NodePath &model, const LVecBase4 &frame); + INLINE explicit TextGraphic(const NodePath &model, PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top); INLINE NodePath get_model() const; INLINE void set_model(const NodePath &model); diff --git a/panda/src/text/textNode.h b/panda/src/text/textNode.h index 5f10e22da3..50266cbfd7 100644 --- a/panda/src/text/textNode.h +++ b/panda/src/text/textNode.h @@ -45,8 +45,8 @@ */ class EXPCL_PANDA_TEXT TextNode : public PandaNode, public TextEncoder, public TextProperties { PUBLISHED: - TextNode(const string &name); - TextNode(const string &name, const TextProperties ©); + explicit TextNode(const string &name); + explicit TextNode(const string &name, const TextProperties ©); protected: TextNode(const TextNode ©); virtual PandaNode *make_copy() const; diff --git a/panda/src/tform/buttonThrower.h b/panda/src/tform/buttonThrower.h index 009055fe3b..2c1a8a3982 100644 --- a/panda/src/tform/buttonThrower.h +++ b/panda/src/tform/buttonThrower.h @@ -34,7 +34,7 @@ */ class EXPCL_PANDA_TFORM ButtonThrower : public DataNode { PUBLISHED: - ButtonThrower(const string &name); + explicit ButtonThrower(const string &name); ~ButtonThrower(); INLINE void set_button_down_event(const string &button_down_event); diff --git a/panda/src/tform/driveInterface.h b/panda/src/tform/driveInterface.h index 49c6a521d7..89f6b069b0 100644 --- a/panda/src/tform/driveInterface.h +++ b/panda/src/tform/driveInterface.h @@ -30,7 +30,7 @@ */ class EXPCL_PANDA_TFORM DriveInterface : public MouseInterfaceNode { PUBLISHED: - DriveInterface(const string &name = ""); + explicit DriveInterface(const string &name = ""); ~DriveInterface(); INLINE void set_forward_speed(PN_stdfloat speed); diff --git a/panda/src/tform/mouseInterfaceNode.h b/panda/src/tform/mouseInterfaceNode.h index 02fdf2c200..1555dba852 100644 --- a/panda/src/tform/mouseInterfaceNode.h +++ b/panda/src/tform/mouseInterfaceNode.h @@ -30,7 +30,7 @@ class ButtonEventList; */ class EXPCL_PANDA_TFORM MouseInterfaceNode : public DataNode { public: - MouseInterfaceNode(const string &name); + explicit MouseInterfaceNode(const string &name); virtual ~MouseInterfaceNode(); PUBLISHED: diff --git a/panda/src/tform/mouseSubregion.h b/panda/src/tform/mouseSubregion.h index acfd8a4142..f500992bcb 100644 --- a/panda/src/tform/mouseSubregion.h +++ b/panda/src/tform/mouseSubregion.h @@ -32,7 +32,7 @@ */ class EXPCL_PANDA_TFORM MouseSubregion : public MouseInterfaceNode { PUBLISHED: - MouseSubregion(const string &name); + explicit MouseSubregion(const string &name); ~MouseSubregion(); INLINE PN_stdfloat get_left() const; diff --git a/panda/src/tform/mouseWatcher.h b/panda/src/tform/mouseWatcher.h index aa67b1b657..c3b4988b7f 100644 --- a/panda/src/tform/mouseWatcher.h +++ b/panda/src/tform/mouseWatcher.h @@ -60,7 +60,7 @@ class DisplayRegion; */ class EXPCL_PANDA_TFORM MouseWatcher : public DataNode, public MouseWatcherBase { PUBLISHED: - MouseWatcher(const string &name = ""); + explicit MouseWatcher(const string &name = ""); ~MouseWatcher(); bool remove_region(MouseWatcherRegion *region); diff --git a/panda/src/tform/mouseWatcherRegion.h b/panda/src/tform/mouseWatcherRegion.h index 2874082750..0230c42d96 100644 --- a/panda/src/tform/mouseWatcherRegion.h +++ b/panda/src/tform/mouseWatcherRegion.h @@ -30,9 +30,9 @@ class MouseWatcherParameter; */ class EXPCL_PANDA_TFORM MouseWatcherRegion : public TypedWritableReferenceCount, public Namable { PUBLISHED: - INLINE MouseWatcherRegion(const string &name, PN_stdfloat left, PN_stdfloat right, - PN_stdfloat bottom, PN_stdfloat top); - INLINE MouseWatcherRegion(const string &name, const LVecBase4 &frame); + INLINE explicit MouseWatcherRegion(const string &name, PN_stdfloat left, PN_stdfloat right, + PN_stdfloat bottom, PN_stdfloat top); + INLINE explicit MouseWatcherRegion(const string &name, const LVecBase4 &frame); INLINE void set_frame(PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top); INLINE void set_frame(const LVecBase4 &frame); diff --git a/panda/src/tform/trackball.h b/panda/src/tform/trackball.h index 964ad7d8dd..634e81f61a 100644 --- a/panda/src/tform/trackball.h +++ b/panda/src/tform/trackball.h @@ -34,7 +34,7 @@ */ class EXPCL_PANDA_TFORM Trackball : public MouseInterfaceNode { PUBLISHED: - Trackball(const string &name); + explicit Trackball(const string &name); ~Trackball(); void reset(); diff --git a/panda/src/tform/transform2sg.h b/panda/src/tform/transform2sg.h index b5c1fa40ba..66939aa096 100644 --- a/panda/src/tform/transform2sg.h +++ b/panda/src/tform/transform2sg.h @@ -27,7 +27,7 @@ */ class EXPCL_PANDA_TFORM Transform2SG : public DataNode { PUBLISHED: - Transform2SG(const string &name); + explicit Transform2SG(const string &name); void set_node(PandaNode *node); PandaNode *get_node() const; diff --git a/panda/src/vrpn/vrpnClient.h b/panda/src/vrpn/vrpnClient.h index 1fd0267601..501c0e2ae8 100644 --- a/panda/src/vrpn/vrpnClient.h +++ b/panda/src/vrpn/vrpnClient.h @@ -34,7 +34,7 @@ class VrpnDialDevice; */ class EXPCL_VRPN VrpnClient : public ClientBase { PUBLISHED: - VrpnClient(const string &server_name); + explicit VrpnClient(const string &server_name); ~VrpnClient(); INLINE const string &get_server_name() const;