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

Ashod Nakashian ashod.nakashian at collabora.co.uk
Mon May 9 05:21:55 UTC 2016


 loolwsd/LOOLProtocol.hpp |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit f20a9e94b64ca76f1ed09fedd066f630919a91e0
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Mon May 9 00:35:45 2016 -0400

    loolwsd: templatize parsing helpers
    
    Change-Id: Ia52dbf59bf5f2a816578b75111ee9accdeaaf816
    Reviewed-on: https://gerrit.libreoffice.org/24780
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loolwsd/LOOLProtocol.hpp b/loolwsd/LOOLProtocol.hpp
index 05cc4b4..21d488b 100644
--- a/loolwsd/LOOLProtocol.hpp
+++ b/loolwsd/LOOLProtocol.hpp
@@ -69,8 +69,8 @@ namespace LOOLProtocol
         return getDelimitedInitialSubstring(message, length, ' ');
     }
 
-    inline
-    std::string getFirstToken(const std::vector<char>& message)
+    template <typename T>
+    std::string getFirstToken(const T& message)
     {
         return getFirstToken(message.data(), message.size());
     }
@@ -96,8 +96,8 @@ namespace LOOLProtocol
         return getDelimitedInitialSubstring(message, length, '\n');
     }
 
-    inline
-    std::string getFirstLine(const std::vector<char>& message)
+    template <typename T>
+    std::string getFirstLine(const T& message)
     {
         return getFirstLine(message.data(), message.size());
     }
@@ -111,8 +111,8 @@ namespace LOOLProtocol
         return getAbbreviatedMessage(message.data(), message.size());
     }
 
-    inline
-    std::string getAbbreviatedMessage(const std::vector<char>& message)
+    template <typename T>
+    std::string getAbbreviatedMessage(const T& message)
     {
         return getAbbreviatedMessage(message.data(), message.size());
     }


More information about the Libreoffice-commits mailing list