From 396239cc78a75ba7be739788485319c92b07d827 Mon Sep 17 00:00:00 2001 From: Pixel Date: Sun, 18 Aug 2002 01:38:23 +0000 Subject: Blehaurg --- generic/String.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'generic/String.cpp') diff --git a/generic/String.cpp b/generic/String.cpp index 0f4da24..c389c13 100644 --- a/generic/String.cpp +++ b/generic/String.cpp @@ -23,17 +23,13 @@ String::String(char c) : siz(1) { str = t; } -String::String(const char * s, ...) : str(s ? Base::strdup(s) : Base::strdup("")) { +String::String(const char * s, ...) { va_list ap; - if (!s) - return; - /* This causes a warning: cannot pass objects of type `const String' through `...' but it is not really a problem. */ va_start(ap, s); vsnprintf(t, BUFSIZ, s, ap); - free(str); str = Base::strdup(t); va_end(ap); siz = ::strlen(str); -- cgit v1.2.3