diff options
author | Aleksandar Kanchev <kanchev@itestra.com> | 2013-06-06 10:38:17 +0200 |
---|---|---|
committer | Gerrit Code Review <qqmthk1@lpmodthk02.bmwgroup.net> | 2013-06-07 08:49:08 +0200 |
commit | 418e94cc94122509eeb73728a33a100b7698d164 (patch) | |
tree | 467dd89fb9e8c4d0c06e5ae89c6fa9cc3abf2c29 | |
parent | a9bb45cd1e743ef08a27a1cb71317429b89b2140 (diff) | |
download | genivi-common-api-dbus-runtime-418e94cc94122509eeb73728a33a100b7698d164.tar.gz |
object manager: add explicit map instantiation
fix clang compiler error by explicitly calling the DBusDaemonProxy::PropertyDictStub()
constructor, while constructing the object path and interface names dictionary.
-rw-r--r-- | src/CommonAPI/DBus/DBusObjectManager.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/CommonAPI/DBus/DBusObjectManager.cpp b/src/CommonAPI/DBus/DBusObjectManager.cpp index 09ff9ba..6e78993 100644 --- a/src/CommonAPI/DBus/DBusObjectManager.cpp +++ b/src/CommonAPI/DBus/DBusObjectManager.cpp @@ -106,19 +106,20 @@ bool DBusObjectManager::onObjectManagerInterfaceDBusMessage(const DBusMessage& d return false; } - DBusDaemonProxy::DBusObjectToInterfaceDict ObjectPathsInterfacesAndPropertiesDict; + DBusDaemonProxy::DBusObjectToInterfaceDict resultObjectPathsInterfacesAndPropertiesDict; objectPathLock_.lock(); auto registeredObjectsIterator = dbusRegisteredObjectsTable_.begin(); while(registeredObjectsIterator != dbusRegisteredObjectsTable_.end()) { DBusInterfaceHandlerPath handlerPath = registeredObjectsIterator->first; - auto foundDictEntry = ObjectPathsInterfacesAndPropertiesDict.find(handlerPath.first); + auto foundDictEntry = resultObjectPathsInterfacesAndPropertiesDict.find(handlerPath.first); - if (foundDictEntry == ObjectPathsInterfacesAndPropertiesDict.end()) { - ObjectPathsInterfacesAndPropertiesDict.insert( { handlerPath.first, { { handlerPath.second, {} } } } ); + if (foundDictEntry == resultObjectPathsInterfacesAndPropertiesDict.end()) { + resultObjectPathsInterfacesAndPropertiesDict.insert( + { handlerPath.first, { { handlerPath.second, DBusDaemonProxy::PropertyDictStub() } } } ); } else { - foundDictEntry->second.insert( {handlerPath.second, {} } ); + foundDictEntry->second.insert( {handlerPath.second, DBusDaemonProxy::PropertyDictStub() } ); } ++registeredObjectsIterator; @@ -129,7 +130,7 @@ bool DBusObjectManager::onObjectManagerInterfaceDBusMessage(const DBusMessage& d DBusMessage dbusMessageReply = dbusMessage.createMethodReturn(getManagedObjectsDBusSignature); DBusOutputStream outStream(dbusMessageReply); - outStream << ObjectPathsInterfacesAndPropertiesDict; + outStream << resultObjectPathsInterfacesAndPropertiesDict; outStream.flush(); return dbusConnection->sendDBusMessage(dbusMessageReply); |