From 62ca61ff4ac794f9c42335d8286343149d4313d1 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 26 Feb 2020 18:46:06 +0100 Subject: 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. --- apt-pkg/cacheset.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apt-pkg/cacheset.cc') 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; } -- cgit v1.2.3