fix(PropertyContainer): create correctly private data

This commit is contained in:
Ronan Abhamon 2017-09-14 15:30:54 +02:00
parent d4d2794cd3
commit d09232f313
2 changed files with 9 additions and 3 deletions

View file

@ -33,10 +33,16 @@ public:
// -----------------------------------------------------------------------------
PropertyContainer::PropertyContainer () : mPrivate(new PropertyContainerPrivate) {}
// Empty copy constructor. Don't change this pattern.
// PropertyContainer is an Entity component, not a simple structure.
// An Entity is UNIQUE.
PropertyContainer::PropertyContainer (const PropertyContainer &) {}
PropertyContainer::PropertyContainer (const PropertyContainer &) : mPrivate(new PropertyContainerPrivate) {}
PropertyContainer::~PropertyContainer () {
delete mPrivate;
}
PropertyContainer &PropertyContainer::operator= (const PropertyContainer &) {
return *this;

View file

@ -33,9 +33,9 @@ class PropertyContainerPrivate;
class LINPHONE_PUBLIC PropertyContainer {
public:
PropertyContainer () = default;
PropertyContainer ();
PropertyContainer (const PropertyContainer &src);
virtual ~PropertyContainer () = default;
virtual ~PropertyContainer ();
PropertyContainer &operator= (const PropertyContainer &src);