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

Miklos Vajna vmiklos at collabora.co.uk
Mon Apr 10 08:50:22 UTC 2017


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

New commits:
commit 8958e1c767b90c67942872b2d72bd8edf0a3e128
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Apr 10 10:44:11 2017 +0200

    wsd: make requestURI a const reference
    
    It's copy-constructed from a const reference but is only used as const
    reference.
    
    Change-Id: I9a58561616bcfeff0c45803f3244f8e78d54731a

diff --git a/wsd/Admin.cpp b/wsd/Admin.cpp
index 78da7ac1..a9039f2b 100644
--- a/wsd/Admin.cpp
+++ b/wsd/Admin.cpp
@@ -253,7 +253,7 @@ bool AdminSocketHandler::handleInitialRequest(
     // Different session id pool for admin sessions (?)
     const auto sessionId = Util::decodeId(LOOLWSD::GenSessionId());
 
-    std::string requestURI = request.getURI();
+    const std::string& requestURI = request.getURI();
     StringTokenizer pathTokens(requestURI, "/", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM);
 
     if (request.find("Upgrade") != request.end() && Poco::icompare(request["Upgrade"], "websocket") == 0)


More information about the Libreoffice-commits mailing list