loolwsd/MasterProcessSession.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 63d911297746e84b8996348e85f15db5c82f2cee Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Thu Apr 14 08:36:56 2016 +0200 MasterProcessSession: const auto -> const auto& where it would create a tmp copy Change-Id: I5bbffb9be562b52f868bfca3f825e8d81dae4eef diff --git a/loolwsd/MasterProcessSession.cpp b/loolwsd/MasterProcessSession.cpp index e67b332..9f3763a 100644 --- a/loolwsd/MasterProcessSession.cpp +++ b/loolwsd/MasterProcessSession.cpp @@ -134,13 +134,13 @@ bool MasterProcessSession::_handleInput(const char *buffer, int length) { const std::string stringMsg(buffer, length); Log::info(getName() + "Command: " + stringMsg); - const auto index = stringMsg.find_first_of("{"); + const auto index = stringMsg.find_first_of('{'); if (index != std::string::npos) { const std::string stringJSON = stringMsg.substr(index); Poco::JSON::Parser parser; const auto result = parser.parse(stringJSON); - const auto object = result.extract<Poco::JSON::Object::Ptr>(); + const auto& object = result.extract<Poco::JSON::Object::Ptr>(); if (object->get("commandName").toString() == ".uno:Save" && object->get("success").toString() == "true") { @@ -233,13 +233,13 @@ bool MasterProcessSession::_handleInput(const char *buffer, int length) else if (tokens[0] == "commandvalues:") { const std::string stringMsg(buffer, length); - const auto index = stringMsg.find_first_of("{"); + const auto index = stringMsg.find_first_of('{'); if (index != std::string::npos) { const std::string stringJSON = stringMsg.substr(index); Poco::JSON::Parser parser; const auto result = parser.parse(stringJSON); - const auto object = result.extract<Poco::JSON::Object::Ptr>(); + const auto& object = result.extract<Poco::JSON::Object::Ptr>(); const std::string commandName = object->get("commandName").toString(); if (commandName.find(".uno:CharFontName") != std::string::npos || commandName.find(".uno:StyleApply") != std::string::npos) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits