diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-07-05 19:18:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-05 19:18:09 +0300 |
commit | 958f7812839160247207c01e78b90f1935022ab3 (patch) | |
tree | 6ec615eb07b26a2ac2b07d747515847f8fdad0bd /indra/llmessage | |
parent | b099dbef27f2af47a421bb9848cfbca1aaa08327 (diff) | |
parent | 1296afd96a74877feb91690ec8dcd99b225554b8 (diff) |
Merge pull request #1930 from RyeMutt/llsd-opts
Introduce move support and string_view to LLSD
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llcorehttputil.cpp | 2 | ||||
-rw-r--r-- | indra/llmessage/lltemplatemessagedispatcher.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp index 684e96883f..3fdc691141 100644 --- a/indra/llmessage/llcorehttputil.cpp +++ b/indra/llmessage/llcorehttputil.cpp @@ -523,7 +523,7 @@ LLSD HttpCoroRawHandler::handleSuccess(LLCore::HttpResponse * response, LLCore:: bas >> std::noskipws; data.assign(std::istream_iterator<U8>(bas), std::istream_iterator<U8>()); - result[HttpCoroutineAdapter::HTTP_RESULTS_RAW] = data; + result[HttpCoroutineAdapter::HTTP_RESULTS_RAW] = std::move(data); #else // This is disabled because it's dangerous. See the other case for an diff --git a/indra/llmessage/lltemplatemessagedispatcher.cpp b/indra/llmessage/lltemplatemessagedispatcher.cpp index 0e709d6c75..edbeb4acc1 100644 --- a/indra/llmessage/lltemplatemessagedispatcher.cpp +++ b/indra/llmessage/lltemplatemessagedispatcher.cpp @@ -43,7 +43,7 @@ void LLTemplateMessageDispatcher::dispatch(const std::string& msg_name, const LLSD& message, LLHTTPNode::ResponsePtr responsep) { - std::vector<U8> data = message["body"]["binary-template-data"].asBinary(); + const LLSD::Binary& data = message["body"]["binary-template-data"].asBinary(); auto size = data.size(); if(size == 0) { @@ -53,11 +53,11 @@ void LLTemplateMessageDispatcher::dispatch(const std::string& msg_name, LLHost host; host = gMessageSystem->getSender(); - bool validate_message = mTemplateMessageReader.validateMessage(&(data[0]), static_cast<S32>(size), host, true); + bool validate_message = mTemplateMessageReader.validateMessage(data.data(), static_cast<S32>(size), host, true); if (validate_message) { - mTemplateMessageReader.readMessage(&(data[0]),host); + mTemplateMessageReader.readMessage(data.data(),host); } else { |