[Libreoffice-commits] online.git: loolwsd/Util.hpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Sun Oct 23 20:59:40 UTC 2016


 loolwsd/Util.hpp |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 77dde6ea71bb3d1ad29c0435496195c83c86d784
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Fri Oct 21 13:01:13 2016 -0400

    loolwsd: ltrim returns the output to pass result as argument
    
    Change-Id: Idc49996f5e24d634fefdc20a15d69c550c9df6ac
    Reviewed-on: https://gerrit.libreoffice.org/30192
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loolwsd/Util.hpp b/loolwsd/Util.hpp
index d99fd36..21ef610 100644
--- a/loolwsd/Util.hpp
+++ b/loolwsd/Util.hpp
@@ -167,13 +167,15 @@ namespace Util
 
     /// Trim spaces from the left. Just spaces.
     inline
-    void ltrim(std::string& s)
+    std::string& ltrim(std::string& s)
     {
         const auto pos = s.find_first_not_of(' ');
         if (pos != std::string::npos)
         {
             s = s.substr(pos);
         }
+
+        return s;
     }
 
     /// Trim spaces from the left and copy. Just spaces.


More information about the Libreoffice-commits mailing list