loolwsd/LOOLForKit.cpp   |    1 -
 loolwsd/LOOLKit.cpp      |    1 -
 loolwsd/Util.hpp         |    4 ++--
 loolwsd/test/helpers.hpp |    8 ++++----
 4 files changed, 6 insertions(+), 8 deletions(-)

New commits:
commit 4104e341f5ab3f8bffb569d93309ccf474749883
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Thu Oct 13 08:19:53 2016 +0200

    Remove unused using declarations
    
    And a few other minor fixes. No need to create an std::string object
    when a char number is enough, nor need to copy an object when passing it
    by reference is enough.
    
    Change-Id: I3d6aba20ffce781532ea77fe079ce64378db6e12

diff --git a/loolwsd/LOOLForKit.cpp b/loolwsd/LOOLForKit.cpp
index c27e001..2ee6306 100644
--- a/loolwsd/LOOLForKit.cpp
+++ b/loolwsd/LOOLForKit.cpp
@@ -39,7 +39,6 @@
 #include "Util.hpp"
 #include "security.h"
 
-using Poco::Path;
 using Poco::Process;
 using Poco::StringTokenizer;
 using Poco::Thread;
diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index d0c5826..426d684 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -77,7 +77,6 @@ using Poco::JSON::Parser;
 using Poco::Net::HTTPClientSession;
 using Poco::Net::HTTPRequest;
 using Poco::Net::HTTPResponse;
-using Poco::Net::NetException;
 using Poco::Net::Socket;
 using Poco::Net::WebSocket;
 using Poco::Path;
diff --git a/loolwsd/Util.hpp b/loolwsd/Util.hpp
index df4f60c..7d73ecc 100644
--- a/loolwsd/Util.hpp
+++ b/loolwsd/Util.hpp
@@ -157,7 +157,7 @@ namespace Util
     inline
     void ltrim(std::string& s)
     {
-        const auto pos = s.find_first_not_of(" ");
+        const auto pos = s.find_first_not_of(' ');
         if (pos != std::string::npos)
         {
             s = s.substr(pos);
@@ -168,7 +168,7 @@ namespace Util
     inline
     std::string ltrimmed(const std::string& s)
     {
-        const auto pos = s.find_first_not_of(" ");
+        const auto pos = s.find_first_not_of(' ');
         if (pos != std::string::npos)
         {
             return s.substr(pos);
diff --git a/loolwsd/test/helpers.hpp b/loolwsd/test/helpers.hpp
index 5f5a5c1..9e3756e 100644
--- a/loolwsd/test/helpers.hpp
+++ b/loolwsd/test/helpers.hpp
@@ -491,25 +491,25 @@ inline int getCharKey(char ch, SpecialKey specialKeys)
     return result | specialKeys;
 }
 
-inline void sendKeyEvent(Poco::Net::WebSocket& socket, const char* type, int 
chr, int key, const std::string testname = "")
+inline void sendKeyEvent(Poco::Net::WebSocket& socket, const char* type, int 
chr, int key, const std::string& testname = "")
 {
     std::ostringstream ssIn;
     ssIn << "key type=" << type << " char=" << chr << " key=" << key;
     sendTextFrame(socket, ssIn.str(), testname);
 }
 
-inline void sendKeyPress(Poco::Net::WebSocket& socket, int chr, int key, const 
std::string testname)
+inline void sendKeyPress(Poco::Net::WebSocket& socket, int chr, int key, const 
std::string& testname)
 {
     sendKeyEvent(socket, "input", chr, key, testname);
     sendKeyEvent(socket, "up", chr, key, testname);
 }
 
-inline void sendChar(Poco::Net::WebSocket& socket, char ch, SpecialKey 
specialKeys=skNone, const std::string testname = "")
+inline void sendChar(Poco::Net::WebSocket& socket, char ch, SpecialKey 
specialKeys=skNone, const std::string& testname = "")
 {
     sendKeyPress(socket, getCharChar(ch, specialKeys), getCharKey(ch, 
specialKeys), testname);
 }
 
-inline void sendText(Poco::Net::WebSocket& socket, const std::string& text, 
const std::string testname = "")
+inline void sendText(Poco::Net::WebSocket& socket, const std::string& text, 
const std::string& testname = "")
 {
     for (char ch : text)
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to