From c563ee72f25c42a1c6f492c5f2d4e56c2c91df2a Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 15 Jul 2015 00:14:45 +0200 Subject: Don't require a smartpointer where not necessary --- common/domain/applicationdomaintype.h | 6 +++--- common/facade.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index f2a4ad6..a673493 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h @@ -54,11 +54,11 @@ public: } template - static typename DomainType::Ptr getInMemoryRepresentation(const ApplicationDomainType::Ptr &domainType) + static typename DomainType::Ptr getInMemoryRepresentation(const ApplicationDomainType &domainType) { //TODO only copy requested properties - auto memoryAdaptor = QSharedPointer::create(*(domainType->mAdaptor)); - return QSharedPointer::create(domainType->mResourceInstanceIdentifier, domainType->mIdentifier, domainType->mRevision, memoryAdaptor); + auto memoryAdaptor = QSharedPointer::create(*(domainType.mAdaptor)); + return QSharedPointer::create(domainType.mResourceInstanceIdentifier, domainType.mIdentifier, domainType.mRevision, memoryAdaptor); } virtual ~ApplicationDomainType() {} diff --git a/common/facade.h b/common/facade.h index ad79213..abd4113 100644 --- a/common/facade.h +++ b/common/facade.h @@ -330,7 +330,7 @@ protected: resultProvider->clear(); auto resultCallback = std::bind(&Akonadi2::ResultProvider::add, resultProvider, std::placeholders::_1); while(resultSet.next([resultCallback](const Akonadi2::ApplicationDomain::ApplicationDomainType::Ptr &value) -> bool { - resultCallback(Akonadi2::ApplicationDomain::ApplicationDomainType::getInMemoryRepresentation(value)); + resultCallback(Akonadi2::ApplicationDomain::ApplicationDomainType::getInMemoryRepresentation(*value)); return true; })){}; storage->abortTransaction(); -- cgit v1.2.3