mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
remove user-defined copy constructor
We need to define our own copy constructor only if an object has pointers or any runtime allocation of the resource like file handle, a network connection..etc. note: Default constructor does only shallow copy.
This commit is contained in:
committed by
Laurent Trinques
parent
9085c6fcda
commit
803414f716
@@ -27,13 +27,6 @@ int NamesList::MetaTypeId = qRegisterMetaType<NamesList>("NamesList");
|
||||
NamesList::NamesList() {
|
||||
}
|
||||
|
||||
/**
|
||||
Constructeur de copie
|
||||
@param other La NamesList a copier
|
||||
*/
|
||||
NamesList::NamesList(const NamesList &other) : hash_names(other.hash_names) {
|
||||
}
|
||||
|
||||
/**
|
||||
Destructeur
|
||||
*/
|
||||
|
||||
@@ -31,7 +31,6 @@ class NamesList {
|
||||
// constructors, destructor
|
||||
public:
|
||||
NamesList();
|
||||
NamesList(const NamesList &);
|
||||
virtual ~NamesList();
|
||||
|
||||
// attributes
|
||||
|
||||
Reference in New Issue
Block a user