wsd: use the more effective overload accepting a character in Storage

I guess checking for "{" in parseJSON() happens for performance reasons,
but then it's a good idea to also avoid constructing a temporary string
for no reason.

Change-Id: I285ba0ed615054fc014796f7d8971a2b9783b075
This commit is contained in:
Miklos Vajna 2017-07-06 11:17:19 +02:00
parent a20afc1ceb
commit 01bf6ab344

View file

@ -412,7 +412,7 @@ void getWOPIValue(const Poco::JSON::Object::Ptr &object, const std::string& key,
bool parseJSON(const std::string& json, Poco::JSON::Object::Ptr& object)
{
bool success = false;
const auto index = json.find_first_of("{");
const auto index = json.find_first_of('{');
if (index != std::string::npos)
{
const std::string stringJSON = json.substr(index);