summaryrefslogtreecommitdiff
path: root/goo
diff options
context:
space:
mode:
authorOliver Sander <oliver.sander@tu-dresden.de>2019-11-18 10:24:29 +0100
committerOliver Sander <oliver.sander@tu-dresden.de>2019-11-18 10:24:32 +0100
commit66fd6879eb647e8349e9ea67258e2da8cf2ecf91 (patch)
treecfb0dd89d7058e6df445912d094fd4279e643d98 /goo
parentf8da50f8e44c3f76fd89d9db57b925052d2c9371 (diff)
Replace GooString::fromInt by std::to_string
Diffstat (limited to 'goo')
-rw-r--r--goo/GooString.cc9
-rw-r--r--goo/GooString.h3
2 files changed, 0 insertions, 12 deletions
diff --git a/goo/GooString.cc b/goo/GooString.cc
index 1fb622be..86fadf30 100644
--- a/goo/GooString.cc
+++ b/goo/GooString.cc
@@ -136,15 +136,6 @@ void formatDoubleSmallAware(double x, char *buf, int bufSize, int prec,
//------------------------------------------------------------------------
-GooString *GooString::fromInt(int x) {
- char buf[24]; // enough space for 64-bit ints plus a little extra
- const char *p;
- int len;
- formatInt(x, buf, sizeof(buf), false, 0, 10, &p, &len);
-
- return new GooString(p, len);
-}
-
GooString *GooString::format(const char *fmt, ...) {
auto *s = new GooString();
diff --git a/goo/GooString.h b/goo/GooString.h
index 38950aef..3bc8abbf 100644
--- a/goo/GooString.h
+++ b/goo/GooString.h
@@ -91,9 +91,6 @@ public:
static_cast<std::string&>(*this).append(*str2);
}
- // Convert an integer to a string.
- static GooString *fromInt(int x);
-
// Create a formatted string. Similar to printf, but without the
// string overflow issues. Formatting elements consist of:
// {<arg>:[<width>][.<precision>]<type>}