From 92bd23f955ad5d33b5689d0ccf0be55d8508961d Mon Sep 17 00:00:00 2001 From: Pawel Andruszkiewicz Date: Tue, 9 Jun 2015 15:48:29 +0200 Subject: [PATCH] [Messaging] Removed accidental usage of temporary variables. Prevent CID: 407660 [Verification] TCT pass rate should not change. Change-Id: Ic067755f903c98f1b4a628cb318b56ab3c054b1b Signed-off-by: Pawel Andruszkiewicz --- src/messaging/messaging_util.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/messaging/messaging_util.cc b/src/messaging/messaging_util.cc index 9d993dd0..04878428 100755 --- a/src/messaging/messaging_util.cc +++ b/src/messaging/messaging_util.cc @@ -965,12 +965,12 @@ PlatformResult MessagingUtil::jsonToMessageConversation(const picojson::value& j MESSAGE_CONVERSATION_ATTRIBUTE_UNREAD_MESSAGES).c_str()); conversation->setUnreadMessages(unreadMessages); - auto preview = MessagingUtil::getValueFromJSONObject(data, - MESSAGE_CONVERSATION_ATTRIBUTE_PREVIEW).c_str(); + std::string preview = MessagingUtil::getValueFromJSONObject(data, + MESSAGE_CONVERSATION_ATTRIBUTE_PREVIEW); conversation->setPreview(preview); - auto subject = MessagingUtil::getValueFromJSONObject(data, - MESSAGE_CONVERSATION_ATTRIBUTE_SUBJECT).c_str(); + std::string subject = MessagingUtil::getValueFromJSONObject(data, + MESSAGE_CONVERSATION_ATTRIBUTE_SUBJECT); conversation->setSubject(subject); /// MESSAGE_CONVERSATION_ATTRIBUTE_IS_READ ? @@ -980,8 +980,8 @@ PlatformResult MessagingUtil::jsonToMessageConversation(const picojson::value& j result.push_back(v.get()); }; - auto from = MessagingUtil::getValueFromJSONObject(data, - MESSAGE_CONVERSATION_ATTRIBUTE_FROM).c_str(); + std::string from = MessagingUtil::getValueFromJSONObject(data, + MESSAGE_CONVERSATION_ATTRIBUTE_FROM); conversation->setFrom(from); auto toJS = MessagingUtil::getValueFromJSONObject>( -- 2.34.1