summaryrefslogtreecommitdiff
path: root/goo
diff options
context:
space:
mode:
authorOliver Sander <oliver.sander@tu-dresden.de>2019-11-18 21:06:59 +0100
committerAlbert Astals Cid <tsdgeos@yahoo.es>2019-11-20 22:09:25 +0000
commitd331bfe09816397d5f6c8ef9744c418bc6063fe9 (patch)
treee4154a0ebaa01d07ac71d0a220f0abde15fa3f69 /goo
parent99f99aa9d475b0640a6efa0aca922c7eaf5bfdc0 (diff)
Allow to append a std::string
This is helpful in situations that mix GooString and std::string.
Diffstat (limited to 'goo')
-rw-r--r--goo/GooString.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/goo/GooString.h b/goo/GooString.h
index 5fccbe83..16e83a26 100644
--- a/goo/GooString.h
+++ b/goo/GooString.h
@@ -139,6 +139,7 @@ public:
// Append a character or string.
GooString *append(char c) { push_back(c); return this; }
GooString *append(const GooString *str) { static_cast<std::string&>(*this).append(*str); return this; }
+ GooString *append(const std::string& str) { static_cast<std::string&>(*this).append(str); return this; }
GooString *append(const char *str) { static_cast<std::string&>(*this).append(str); return this; }
GooString *append(const char *str, int lengthA) { static_cast<std::string&>(*this).append(str, lengthA); return this; }