[Libreoffice-commits] online.git: wsd/Storage.cpp

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Mon Jan 20 09:08:27 UTC 2020


 wsd/Storage.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2c9e1319d9ae27989c51f5c4eb33ef861722d80c
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Jan 20 09:26:01 2020 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Jan 20 10:08:09 2020 +0100

    Fix a -Werror,-Wrange-loop-analysis warning
    
    wsd/Storage.cpp:451:21: error: loop variable 'header' of type 'const std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >' creates a copy from type 'const std::pair<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >' [-Werror,-Wrange-loop-analysis]
    
    Change-Id: I90a57333b0807f3457d5b1082097426a3bf9678d
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87055
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp
index e1efa864c..0be7c7c7b 100644
--- a/wsd/Storage.cpp
+++ b/wsd/Storage.cpp
@@ -448,7 +448,7 @@ static void addStorageReuseCookie(Poco::Net::HTTPRequest& request, const std::st
 
 void addWopiProof(Poco::Net::HTTPRequest& request, const std::string& access_token)
 {
-    for (const auto header : GetProofHeaders(access_token, request.getURI()))
+    for (const auto& header : GetProofHeaders(access_token, request.getURI()))
         request.set(header.first, header.second);
 }
 


More information about the Libreoffice-commits mailing list