diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2020-02-26 18:46:06 +0100 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2020-02-26 18:59:39 +0100 |
commit | 62ca61ff4ac794f9c42335d8286343149d4313d1 (patch) | |
tree | 71eb37d2df34eebc91cffbb46a879bd21a12b8e7 /apt-pkg/cacheset.cc | |
parent | d36b06d7eb300ca5cbee22b4fcedaefc80585da1 (diff) |
cacheset: Fix -Wdeprecated-copy warnings
Remove the operator= from Container_iterator, as it was basically
just the default anyway, and add copy constructors to *Interface
that match their operator=.
Tried adding copy constructor to Container_iterator, but that only
made things worse.
Diffstat (limited to 'apt-pkg/cacheset.cc')
-rw-r--r-- | apt-pkg/cacheset.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc index ae1d5ee3e..288180f16 100644 --- a/apt-pkg/cacheset.cc +++ b/apt-pkg/cacheset.cc @@ -915,6 +915,7 @@ CacheSetHelper::CacheSetHelper(bool const ShowError, GlobalError::MsgType ErrorT CacheSetHelper::~CacheSetHelper() {} PackageContainerInterface::PackageContainerInterface() : ConstructedBy(CacheSetHelper::UNKNOWN), d(NULL) {} +PackageContainerInterface::PackageContainerInterface(PackageContainerInterface const &by) : PackageContainerInterface() { *this = by; } PackageContainerInterface::PackageContainerInterface(CacheSetHelper::PkgSelector const by) : ConstructedBy(by), d(NULL) {} PackageContainerInterface& PackageContainerInterface::operator=(PackageContainerInterface const &other) { if (this != &other) @@ -928,6 +929,9 @@ PackageUniverse::PackageUniverse(pkgCacheFile * const Owner) : _cont(Owner->GetP PackageUniverse::~PackageUniverse() {} VersionContainerInterface::VersionContainerInterface() : d(NULL) {} +VersionContainerInterface::VersionContainerInterface(VersionContainerInterface const &other) : VersionContainerInterface() { + *this = other; +}; VersionContainerInterface& VersionContainerInterface::operator=(VersionContainerInterface const &) { return *this; } |