Commit 3355e20b authored by Oliver Sander's avatar Oliver Sander Committed by Albert Astals Cid

Implement fillGooString in terms of fillString

This requires to add a method to GooString that allows access
as a mutable std::string&.
parent 5804f51c
Pipeline #111706 passed with stage
in 3 minutes and 18 seconds
......@@ -68,6 +68,7 @@ public:
explicit GooString(std::string&& str) : std::string(std::move(str)) {}
const std::string& toStr() const { return *this; }
std::string& toNonConstStr() { return *this; }
// Create a string from <lengthA> chars at <sA>. This string
// can contain null characters.
......
......@@ -142,12 +142,7 @@ public:
inline void fillGooString(GooString *s)
{
unsigned char readBuf[4096];
int readChars;
reset();
while ((readChars = doGetChars(4096, readBuf)) != 0) {
s->append((const char *)readBuf, readChars);
}
fillString(s->toNonConstStr());
}
inline unsigned char *toUnsignedChars(int *length, int initialSize = 4096, int sizeIncrement = 4096)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment