Fixing build brake for gcc 4.6 35/30535/2
authorJan Olszak <j.olszak@samsung.com>
Wed, 19 Nov 2014 14:26:28 +0000 (15:26 +0100)
committerJan Olszak <j.olszak@samsung.com>
Wed, 19 Nov 2014 15:16:45 +0000 (16:16 +0100)
[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build with older gcc

Change-Id: I0c889f7d79e10403a18b915c0c30e91400542de4

common/ipc/internals/processor.cpp

index 50327c0..5634880 100644 (file)
@@ -109,7 +109,8 @@ Processor::PeerID Processor::addPeer(const std::shared_ptr<Socket>& socketPtr)
     {
         Lock lock(mSocketsMutex);
         peerID = getNextPeerID();
-        mNewSockets.emplace(peerID, std::move(socketPtr));
+        SocketInfo socketInfo(peerID, std::move(socketPtr));
+        mNewSockets.push(std::move(socketInfo));
     }
     LOGI("New peer added. Id: " << peerID);
     mEventQueue.send(Event::NEW_PEER);
@@ -392,7 +393,7 @@ bool Processor::handleEvent()
                 return false;
             }
 
-            mSockets.emplace(socketInfo.peerID, std::move(socketInfo.socketPtr));
+            mSockets[socketInfo.peerID] = std::move(socketInfo.socketPtr);
         }
         resetPolling();
         if (mNewPeerCallback) {
@@ -454,9 +455,11 @@ bool Processor::handleCall()
         if (mReturnCallbacks.count(messageID) != 0) {
             LOGE("There already was a return callback for messageID: " << messageID);
         }
-        mReturnCallbacks.emplace(messageID, ReturnCallbacks(call.peerID,
-                                                            std::move(call.parse),
-                                                            std::move(call.process)));
+
+        // move insertion
+        mReturnCallbacks[messageID] = std::move(ReturnCallbacks(call.peerID,
+                                                                std::move(call.parse),
+                                                                std::move(call.process)));
     }
 
     try {