modernize C++: use equals delete
This commit is contained in:
@@ -32,7 +32,7 @@ class Application;
|
||||
|
||||
/// Helper class to manager transaction (i.e. undo/redo)
|
||||
class AppExport AutoTransaction {
|
||||
private:
|
||||
public:
|
||||
/// Private new operator to prevent heap allocation
|
||||
void* operator new (std::size_t) = delete;
|
||||
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
|
||||
friend class Application;
|
||||
|
||||
private:
|
||||
public:
|
||||
/// Private new operator to prevent heap allocation
|
||||
void* operator new (std::size_t) = delete;
|
||||
|
||||
|
||||
@@ -306,11 +306,11 @@ public:
|
||||
*/
|
||||
App::Document* operator->() const noexcept;
|
||||
|
||||
private:
|
||||
// disable
|
||||
DocumentWeakPtrT(const DocumentWeakPtrT&);
|
||||
DocumentWeakPtrT& operator=(const DocumentWeakPtrT&);
|
||||
DocumentWeakPtrT(const DocumentWeakPtrT&) = delete;
|
||||
DocumentWeakPtrT& operator=(const DocumentWeakPtrT&) = delete;
|
||||
|
||||
private:
|
||||
class Private;
|
||||
std::unique_ptr<Private> d;
|
||||
};
|
||||
@@ -368,9 +368,11 @@ public:
|
||||
|
||||
private:
|
||||
App::DocumentObject* _get() const noexcept;
|
||||
|
||||
public:
|
||||
// disable
|
||||
DocumentObjectWeakPtrT(const DocumentObjectWeakPtrT&);
|
||||
DocumentObjectWeakPtrT& operator=(const DocumentObjectWeakPtrT&);
|
||||
DocumentObjectWeakPtrT(const DocumentObjectWeakPtrT&) = delete;
|
||||
DocumentObjectWeakPtrT& operator=(const DocumentObjectWeakPtrT&) = delete;
|
||||
|
||||
private:
|
||||
class Private;
|
||||
@@ -444,10 +446,9 @@ public:
|
||||
return ptr.get<T>();
|
||||
}
|
||||
|
||||
private:
|
||||
// disable
|
||||
WeakPtrT(const WeakPtrT&);
|
||||
WeakPtrT& operator=(const WeakPtrT&);
|
||||
WeakPtrT(const WeakPtrT&) = delete;
|
||||
WeakPtrT& operator=(const WeakPtrT&) = delete;
|
||||
|
||||
private:
|
||||
DocumentObjectWeakPtrT ptr;
|
||||
|
||||
@@ -286,11 +286,12 @@ protected:
|
||||
/// Verify a path for the current property
|
||||
virtual void verifyPath(const App::ObjectIdentifier & p) const;
|
||||
|
||||
private:
|
||||
public:
|
||||
// forbidden
|
||||
Property(const Property&);
|
||||
Property& operator = (const Property&);
|
||||
Property(const Property&) = delete;
|
||||
Property& operator = (const Property&) = delete;
|
||||
|
||||
private:
|
||||
// Sync status with Property_Type
|
||||
void syncType(unsigned type);
|
||||
|
||||
|
||||
@@ -248,10 +248,10 @@ protected:
|
||||
virtual void handleChangedPropertyName(Base::XMLReader &reader, const char * TypeName, const char *PropName);
|
||||
virtual void handleChangedPropertyType(Base::XMLReader &reader, const char * TypeName, Property * prop);
|
||||
|
||||
private:
|
||||
public:
|
||||
// forbidden
|
||||
PropertyContainer(const PropertyContainer&);
|
||||
PropertyContainer& operator = (const PropertyContainer&);
|
||||
PropertyContainer(const PropertyContainer&) = delete;
|
||||
PropertyContainer& operator = (const PropertyContainer&) = delete;
|
||||
|
||||
protected:
|
||||
DynamicProperty dynamicProps;
|
||||
|
||||
Reference in New Issue
Block a user