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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Aug 3 07:10:27 UTC 2018


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

New commits:
commit 468f8fedb5aca9b56134f86e8e77864a2ad85d7f
Author:     Miklos Vajna <vmiklos at collabora.co.uk>
AuthorDate: Fri Aug 3 09:10:02 2018 +0200
Commit:     Miklos Vajna <vmiklos at collabora.co.uk>
CommitDate: Fri Aug 3 09:10:09 2018 +0200

    wsd: 'path' is copy-constructed from a const reference but is only used as const reference
    
    Make it a const reference.

diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index 4bf3e4cb6..2abc2c0f8 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -435,7 +435,7 @@ void FileServerRequestHandler::sendError(int errorCode, const Poco::Net::HTTPReq
                                          const std::string& extraHeader)
 {
     Poco::URI requestUri(request.getURI());
-    std::string path(requestUri.getPath());
+    const std::string& path = requestUri.getPath();
     std::ostringstream oss;
     oss << "HTTP/1.1 " << errorCode << "\r\n"
         << "Content-Type: text/html charset=UTF-8\r\n"


More information about the Libreoffice-commits mailing list