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

Michael Meeks michael.meeks at collabora.com
Wed Apr 20 19:47:45 UTC 2016


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

New commits:
commit 9d913f986b58f2219dbb5708f37336b88b0f7566
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Wed Apr 20 20:47:00 2016 +0100

    Use size_t for iterating tokens.

diff --git a/loolwsd/LOOLProtocol.cpp b/loolwsd/LOOLProtocol.cpp
index eac5c71..9420be8 100644
--- a/loolwsd/LOOLProtocol.cpp
+++ b/loolwsd/LOOLProtocol.cpp
@@ -119,7 +119,7 @@ namespace LOOLProtocol
 
     bool getTokenInteger(const Poco::StringTokenizer& tokens, const std::string& name, int& value)
     {
-        for (int i = 0; i < tokens.count(); i++)
+        for (size_t i = 0; i < tokens.count(); i++)
         {
             if (getTokenInteger(tokens[i], name, value))
                 return true;
@@ -129,7 +129,7 @@ namespace LOOLProtocol
 
     bool getTokenString(const Poco::StringTokenizer& tokens, const std::string& name, std::string& value)
     {
-        for (int i = 0; i < tokens.count(); i++)
+        for (size_t i = 0; i < tokens.count(); i++)
         {
             if (getTokenString(tokens[i], name, value))
                 return true;
@@ -139,7 +139,7 @@ namespace LOOLProtocol
 
     bool getTokenKeyword(const Poco::StringTokenizer& tokens, const std::string& name, const std::map<std::string, int>& map, int& value)
     {
-        for (int i = 0; i < tokens.count(); i++)
+        for (size_t i = 0; i < tokens.count(); i++)
         {
             if (getTokenKeyword(tokens[i], name, map, value))
                 return true;


More information about the Libreoffice-commits mailing list