summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-07-15 00:14:45 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-07-15 00:14:45 +0200
commitc563ee72f25c42a1c6f492c5f2d4e56c2c91df2a (patch)
tree223e06f85324baec70a8a1a5d27e766e6f9523af /common
parent64f4244f5b5a2e830a240b6962c6708bd12a6d35 (diff)
downloadsink-c563ee72f25c42a1c6f492c5f2d4e56c2c91df2a.tar.gz
sink-c563ee72f25c42a1c6f492c5f2d4e56c2c91df2a.zip
Don't require a smartpointer where not necessary
Diffstat (limited to 'common')
-rw-r--r--common/domain/applicationdomaintype.h6
-rw-r--r--common/facade.h2
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:
54 } 54 }
55 55
56 template <typename DomainType> 56 template <typename DomainType>
57 static typename DomainType::Ptr getInMemoryRepresentation(const ApplicationDomainType::Ptr &domainType) 57 static typename DomainType::Ptr getInMemoryRepresentation(const ApplicationDomainType &domainType)
58 { 58 {
59 //TODO only copy requested properties 59 //TODO only copy requested properties
60 auto memoryAdaptor = QSharedPointer<Akonadi2::ApplicationDomain::MemoryBufferAdaptor>::create(*(domainType->mAdaptor)); 60 auto memoryAdaptor = QSharedPointer<Akonadi2::ApplicationDomain::MemoryBufferAdaptor>::create(*(domainType.mAdaptor));
61 return QSharedPointer<DomainType>::create(domainType->mResourceInstanceIdentifier, domainType->mIdentifier, domainType->mRevision, memoryAdaptor); 61 return QSharedPointer<DomainType>::create(domainType.mResourceInstanceIdentifier, domainType.mIdentifier, domainType.mRevision, memoryAdaptor);
62 } 62 }
63 63
64 virtual ~ApplicationDomainType() {} 64 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:
330 resultProvider->clear(); 330 resultProvider->clear();
331 auto resultCallback = std::bind(&Akonadi2::ResultProvider<typename DomainType::Ptr>::add, resultProvider, std::placeholders::_1); 331 auto resultCallback = std::bind(&Akonadi2::ResultProvider<typename DomainType::Ptr>::add, resultProvider, std::placeholders::_1);
332 while(resultSet.next([resultCallback](const Akonadi2::ApplicationDomain::ApplicationDomainType::Ptr &value) -> bool { 332 while(resultSet.next([resultCallback](const Akonadi2::ApplicationDomain::ApplicationDomainType::Ptr &value) -> bool {
333 resultCallback(Akonadi2::ApplicationDomain::ApplicationDomainType::getInMemoryRepresentation<DomainType>(value)); 333 resultCallback(Akonadi2::ApplicationDomain::ApplicationDomainType::getInMemoryRepresentation<DomainType>(*value));
334 return true; 334 return true;
335 })){}; 335 })){};
336 storage->abortTransaction(); 336 storage->abortTransaction();