[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-poppler
Subject:    [poppler] goo/GooString.h
From:       GitLab Mirror <gitlab-mirror () kemper ! freedesktop ! org>
Date:       2022-04-01 22:39:59
Message-ID: 20220401223959.F2B80760BC () kemper ! freedesktop ! org
[Download RAW message or body]

 goo/GooString.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit e7adc2c5fa0559d8dea76c67e37f7be3f50237a0
Author: Albert Astals Cid <aacid@kde.org>
Date:   Sat Apr 2 00:36:03 2022 +0200

    More GooString to size_t where it makes some sense

diff --git a/goo/GooString.h b/goo/GooString.h
index e09875e6..86af849e 100644
--- a/goo/GooString.h
+++ b/goo/GooString.h
@@ -78,11 +78,11 @@ public:
 
     // Create a string from <lengthA> chars at <sA>.  This string
     // can contain null characters.
-    GooString(const char *sA, int lengthA) : std::string(sA ? sA : "", sA ? lengthA : 0) { }
+    GooString(const char *sA, size_t lengthA) : std::string(sA ? sA : "", sA ? lengthA : 0) { }
 
     // Create a string from <lengthA> chars at <idx> in <str>.
-    GooString(const GooString *str, int idx, int lengthA) : std::string(*str, idx, lengthA) { }
-    GooString(const std::string &str, int idx, int lengthA) : std::string(str, idx, lengthA) { }
+    GooString(const GooString *str, int idx, size_t lengthA) : std::string(*str, idx, lengthA) { }
+    GooString(const std::string &str, int idx, size_t lengthA) : std::string(str, idx, lengthA) { }
 
     // Set content of a string to <newStr>.
     GooString *Set(const GooString *newStr)
@@ -150,7 +150,7 @@ public:
     using std::string::c_str;
 
     // Get <i>th character.
-    char getChar(int i) const { return (*this)[i]; }
+    char getChar(size_t i) const { return (*this)[i]; }
 
     // Change <i>th character.
     void setChar(int i, char c) { (*this)[i] = c; }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic