Mark constructors 'explicit' for which coercion makes no sense

This commit is contained in:
rdb 2017-11-06 19:47:38 +01:00
parent dc1f5dd3b1
commit dd2806c8bd
273 changed files with 450 additions and 462 deletions

View File

@ -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();
};

View File

@ -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);

View File

@ -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();

View File

@ -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();
/*

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -31,7 +31,7 @@
*/
class EXPCL_DIRECT CMetaInterval : public CInterval {
PUBLISHED:
CMetaInterval(const string &name);
explicit CMetaInterval(const string &name);
virtual ~CMetaInterval();
enum RelativeStart {

View File

@ -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();

View File

@ -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();

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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 &copy) = 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 &copy) = delete;

View File

@ -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 &copy);
INLINE void operator = (const StreamReader &copy);
INLINE ~StreamReader();

View File

@ -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;

View File

@ -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 &copy);
INLINE void operator = (const StreamWriter &copy);
INLINE ~StreamWriter();

View File

@ -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;

View File

@ -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;

View File

@ -32,7 +32,7 @@ private:
INLINE BulletBoxShape() : _shape(NULL) {};
PUBLISHED:
BulletBoxShape(const LVecBase3 &halfExtents);
explicit BulletBoxShape(const LVecBase3 &halfExtents);
INLINE BulletBoxShape(const BulletBoxShape &copy);
INLINE void operator = (const BulletBoxShape &copy);
INLINE ~BulletBoxShape();

View File

@ -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 &copy);
INLINE void operator = (const BulletCapsuleShape &copy);
INLINE ~BulletCapsuleShape();

View File

@ -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);

View File

@ -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 &copy);
INLINE void operator = (const BulletConeShape &copy);
INLINE ~BulletConeShape();

View File

@ -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);

View File

@ -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 &copy);
INLINE void operator = (const BulletConvexPointCloudShape &copy);
INLINE ~BulletConvexPointCloudShape();

View File

@ -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 &copy);
INLINE void operator = (const BulletCylinderShape &copy);
INLINE ~BulletCylinderShape();

View File

@ -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();

View File

@ -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

View File

@ -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

View File

@ -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 &copy);
INLINE void operator = (const BulletHeightfieldShape &copy);
INLINE ~BulletHeightfieldShape();

View File

@ -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();

View File

@ -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 &copy);
INLINE void operator = (const BulletMinkowskiSumShape &copy);
INLINE ~BulletMinkowskiSumShape();

View File

@ -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 &copy);
INLINE void operator = (const BulletMultiSphereShape &copy);
INLINE ~BulletMultiSphereShape();

View File

@ -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 &copy);
INLINE void operator = (const BulletPlaneShape &copy);
INLINE ~BulletPlaneShape();

View File

@ -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;

View File

@ -31,7 +31,7 @@ private:
INLINE BulletSphereShape() : _shape(NULL) {};
PUBLISHED:
BulletSphereShape(PN_stdfloat radius);
explicit BulletSphereShape(PN_stdfloat radius);
INLINE BulletSphereShape(const BulletSphereShape &copy);
INLINE void operator = (const BulletSphereShape &copy);
INLINE ~BulletSphereShape();

View File

@ -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

View File

@ -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 &copy);
INLINE void operator = (const BulletTriangleMeshShape &copy);
INLINE ~BulletTriangleMeshShape();

View File

@ -31,7 +31,7 @@ protected:
AnimBundle(AnimGroup *parent, const AnimBundle &copy);
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;

View File

@ -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();

View File

@ -34,7 +34,7 @@ protected:
AnimChannelMatrixXfmTable(AnimGroup *parent, const AnimChannelMatrixXfmTable &copy);
PUBLISHED:
AnimChannelMatrixXfmTable(AnimGroup *parent, const string &name);
explicit AnimChannelMatrixXfmTable(AnimGroup *parent, const string &name);
virtual ~AnimChannelMatrixXfmTable();
public:

View File

@ -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;

View File

@ -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();

View File

@ -55,7 +55,7 @@ protected:
PartBundle(const PartBundle &copy);
PUBLISHED:
PartBundle(const string &name = "");
explicit PartBundle(const string &name = "");
virtual PartGroup *make_copy() const;
INLINE CPT(AnimPreloadTable) get_anim_preload() const;

View File

@ -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();

View File

@ -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;

View File

@ -41,7 +41,7 @@ protected:
Character(const Character &copy, bool copy_bundles);
PUBLISHED:
Character(const string &name);
explicit Character(const string &name);
virtual ~Character();
public:

View File

@ -35,9 +35,9 @@ protected:
CharacterJoint(const CharacterJoint &copy);
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:

View File

@ -30,7 +30,7 @@ protected:
INLINE CharacterJointBundle(const CharacterJointBundle &copy);
PUBLISHED:
CharacterJointBundle(const string &name = "");
explicit CharacterJointBundle(const string &name = "");
virtual ~CharacterJointBundle();
PUBLISHED:

View File

@ -31,7 +31,7 @@ protected:
CharacterSlider(const CharacterSlider &copy);
PUBLISHED:
CharacterSlider(PartGroup *parent, const string &name);
explicit CharacterSlider(PartGroup *parent, const string &name);
virtual ~CharacterSlider();
virtual PartGroup *make_copy() const;

View File

@ -26,9 +26,9 @@
*/
class EXPCL_PANDA_COLLIDE CollisionBox : public CollisionSolid {
PUBLISHED:
INLINE CollisionBox(const LPoint3 &center,
PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
INLINE CollisionBox(const LPoint3 &min, const LPoint3 &max);
INLINE explicit CollisionBox(const LPoint3 &center,
PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
INLINE explicit CollisionBox(const LPoint3 &min, const LPoint3 &max);
virtual LPoint3 get_collision_origin() const;

View File

@ -26,8 +26,8 @@
*/
class EXPCL_PANDA_COLLIDE CollisionInvSphere : public CollisionSphere {
PUBLISHED:
INLINE CollisionInvSphere(const LPoint3 &center, PN_stdfloat radius);
INLINE CollisionInvSphere(PN_stdfloat cx, PN_stdfloat cy, PN_stdfloat cz, PN_stdfloat radius);
INLINE explicit CollisionInvSphere(const LPoint3 &center, PN_stdfloat radius);
INLINE explicit CollisionInvSphere(PN_stdfloat cx, PN_stdfloat cy, PN_stdfloat cz, PN_stdfloat radius);
protected:
INLINE CollisionInvSphere();

View File

@ -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 &copy);

View File

@ -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 &copy);

View File

@ -32,7 +32,7 @@ class LensNode;
class EXPCL_PANDA_COLLIDE CollisionParabola : public CollisionSolid {
PUBLISHED:
INLINE CollisionParabola();
INLINE CollisionParabola(const LParabola &parabola, PN_stdfloat t1, PN_stdfloat t2);
INLINE explicit CollisionParabola(const LParabola &parabola, PN_stdfloat t1, PN_stdfloat t2);
virtual LPoint3 get_collision_origin() const;

View File

@ -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;

View File

@ -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;

View File

@ -24,8 +24,8 @@
*/
class EXPCL_PANDA_COLLIDE CollisionSphere : public CollisionSolid {
PUBLISHED:
INLINE CollisionSphere(const LPoint3 &center, PN_stdfloat radius);
INLINE CollisionSphere(PN_stdfloat cx, PN_stdfloat cy, PN_stdfloat cz, PN_stdfloat radius);
INLINE explicit CollisionSphere(const LPoint3 &center, PN_stdfloat radius);
INLINE explicit CollisionSphere(PN_stdfloat cx, PN_stdfloat cy, PN_stdfloat cz, PN_stdfloat radius);
virtual LPoint3 get_collision_origin() const;

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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 &copy);

View File

@ -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);

View File

@ -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:

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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 &copy);
INLINE EggAnimData &operator = (const EggAnimData &copy);

View File

@ -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 &copy);
INLINE EggAnimPreload &operator = (const EggAnimPreload &copy);

View File

@ -25,7 +25,7 @@
*/
class EXPCL_PANDAEGG EggBin : public EggGroup {
PUBLISHED:
EggBin(const string &name = "");
explicit EggBin(const string &name = "");
EggBin(const EggGroup &copy);
EggBin(const EggBin &copy);

View File

@ -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 &copy);
// You can use the string operators to directly set and manipulate the

View File

@ -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 &copy);
INLINE EggCompositePrimitive &operator = (const EggCompositePrimitive &copy);
virtual ~EggCompositePrimitive();

View File

@ -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 &copy);
INLINE EggCurve &operator = (const EggCurve &copy);

View File

@ -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 &copy);
EggExternalReference &operator = (const EggExternalReference &copy);

View File

@ -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 &copy);
INLINE EggFilenameNode &operator = (const EggFilenameNode &copy);

View File

@ -132,7 +132,7 @@ PUBLISHED:
BO_one_minus_alpha_scale,
};
EggGroup(const string &name = "");
explicit EggGroup(const string &name = "");
EggGroup(const EggGroup &copy);
EggGroup &operator = (const EggGroup &copy);
~EggGroup();

View File

@ -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 &copy);
EggGroupNode &operator = (const EggGroupNode &copy);
virtual ~EggGroupNode();

View File

@ -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);

View File

@ -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 &copy);
INLINE EggLine &operator = (const EggLine &copy);
virtual ~EggLine();

View File

@ -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 &copy);
virtual void write(ostream &out, int indent_level) const;

View File

@ -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 &copy);
INLINE EggNamedObject &operator = (const EggNamedObject &copy);

View File

@ -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 &copy);
INLINE EggNode &operator = (const EggNode &copy);

View File

@ -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 &copy);
INLINE EggNurbsCurve &operator = (const EggNurbsCurve &copy);

View File

@ -32,7 +32,7 @@ PUBLISHED:
typedef Loops Trim;
typedef plist<Trim> Trims;
INLINE EggNurbsSurface(const string &name = "");
INLINE explicit EggNurbsSurface(const string &name = "");
INLINE EggNurbsSurface(const EggNurbsSurface &copy);
INLINE EggNurbsSurface &operator = (const EggNurbsSurface &copy);

View File

@ -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 &copy);
INLINE EggPatch &operator = (const EggPatch &copy);

View File

@ -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 &copy);
INLINE EggPoint &operator = (const EggPoint &copy);

View File

@ -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 &copy);
INLINE EggPolygon &operator = (const EggPolygon &copy);

View File

@ -67,7 +67,7 @@ PUBLISHED:
S_per_vertex
};
INLINE EggPrimitive(const string &name = "");
INLINE explicit EggPrimitive(const string &name = "");
INLINE EggPrimitive(const EggPrimitive &copy);
INLINE EggPrimitive &operator = (const EggPrimitive &copy);
INLINE ~EggPrimitive();

View File

@ -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 &copy);
INLINE EggSAnimData &operator = (const EggSAnimData &copy);

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