App: Single arg ctors must be explicit
This commit is contained in:
@@ -49,9 +49,9 @@ public:
|
||||
/*! Constructor */
|
||||
DocumentT();
|
||||
/*! Constructor */
|
||||
DocumentT(Document*);
|
||||
DocumentT(Document*); // explicit bombs
|
||||
/*! Constructor */
|
||||
DocumentT(const std::string&);
|
||||
explicit DocumentT(const std::string&);
|
||||
/*! Constructor */
|
||||
DocumentT(const DocumentT&);
|
||||
/*! Destructor */
|
||||
@@ -99,13 +99,13 @@ public:
|
||||
/*! Constructor */
|
||||
DocumentObjectT(DocumentObjectT &&);
|
||||
/*! Constructor */
|
||||
DocumentObjectT(const DocumentObject*);
|
||||
explicit DocumentObjectT(const DocumentObject*);
|
||||
/*! Constructor */
|
||||
DocumentObjectT(const Document*, const std::string& objName);
|
||||
/*! Constructor */
|
||||
DocumentObjectT(const char *docName, const char *objName);
|
||||
/*! Constructor */
|
||||
DocumentObjectT(const Property*);
|
||||
explicit DocumentObjectT(const Property*);
|
||||
/*! Destructor */
|
||||
~DocumentObjectT();
|
||||
/*! Assignment operator */
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
SubObjectT(const DocumentObject*, const char *subname);
|
||||
|
||||
/*! Constructor */
|
||||
SubObjectT(const DocumentObject*);
|
||||
SubObjectT(const DocumentObject*);// explicit bombs
|
||||
|
||||
/*! Constructor */
|
||||
SubObjectT(const char *docName, const char *objName, const char *subname);
|
||||
@@ -257,13 +257,13 @@ public:
|
||||
PropertyLinkT();
|
||||
|
||||
/*! Constructor */
|
||||
PropertyLinkT(DocumentObject *obj);
|
||||
PropertyLinkT(DocumentObject *obj);// explicit bombs
|
||||
|
||||
/*! Constructor */
|
||||
PropertyLinkT(DocumentObject *obj, const std::vector<std::string>& subNames);
|
||||
|
||||
/*! Constructor */
|
||||
PropertyLinkT(const std::vector<DocumentObject*>& objs);
|
||||
explicit PropertyLinkT(const std::vector<DocumentObject*>& objs);
|
||||
|
||||
/*! Constructor */
|
||||
PropertyLinkT(const std::vector<DocumentObject*>& objs, const std::vector<std::string>& subNames);
|
||||
@@ -281,7 +281,7 @@ private:
|
||||
class AppExport DocumentWeakPtrT
|
||||
{
|
||||
public:
|
||||
DocumentWeakPtrT(App::Document*) noexcept;
|
||||
explicit DocumentWeakPtrT(App::Document*) noexcept;
|
||||
~DocumentWeakPtrT();
|
||||
|
||||
/*!
|
||||
@@ -320,7 +320,7 @@ private:
|
||||
class AppExport DocumentObjectWeakPtrT
|
||||
{
|
||||
public:
|
||||
DocumentObjectWeakPtrT(App::DocumentObject*);
|
||||
explicit DocumentObjectWeakPtrT(App::DocumentObject*);
|
||||
~DocumentObjectWeakPtrT();
|
||||
|
||||
/*!
|
||||
@@ -383,7 +383,7 @@ template <class T>
|
||||
class WeakPtrT
|
||||
{
|
||||
public:
|
||||
WeakPtrT(T* t) : ptr(t) {
|
||||
explicit WeakPtrT(T* t) : ptr(t) {
|
||||
}
|
||||
~WeakPtrT() = default;
|
||||
|
||||
@@ -466,7 +466,7 @@ class AppExport DocumentObserver
|
||||
public:
|
||||
/// Constructor
|
||||
DocumentObserver();
|
||||
DocumentObserver(Document*);
|
||||
explicit DocumentObserver(Document*);
|
||||
virtual ~DocumentObserver();
|
||||
|
||||
/** Attaches to another document, the old document
|
||||
|
||||
Reference in New Issue
Block a user