From 516d38bd7bca5562ebb7b21b96a5dd62152ee52e Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 9 Feb 2017 14:06:17 +0100 Subject: Cleaner index syntax, don't index messageid twice --- common/typeindex.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'common/typeindex.cpp') diff --git a/common/typeindex.cpp b/common/typeindex.cpp index 077bfa1..a65c676 100644 --- a/common/typeindex.cpp +++ b/common/typeindex.cpp @@ -102,6 +102,12 @@ void TypeIndex::addProperty(const QByteArray &property) mProperties << property; } +template <> +void TypeIndex::addProperty(const QByteArray &property) +{ + addProperty(property); +} + template <> void TypeIndex::addPropertyWithSorting(const QByteArray &property, const QByteArray &sortProperty) { @@ -114,8 +120,15 @@ void TypeIndex::addPropertyWithSorting(const QByteArray & mSortedProperties.insert(property, sortProperty); } +template <> +void TypeIndex::addPropertyWithSorting(const QByteArray &property, const QByteArray &sortProperty) +{ + addPropertyWithSorting(property, sortProperty); +} + void TypeIndex::add(const QByteArray &identifier, const Sink::ApplicationDomain::ApplicationDomainType &entity, Sink::Storage::DataStore::Transaction &transaction) { + SinkTrace() << "add " << identifier; for (const auto &property : mProperties) { const auto value = entity.getProperty(property); auto indexer = mIndexer.value(property); -- cgit v1.2.3