From 4ef16ca85bcf0ba44d85c4b35fbf4206b392ef8c Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 16 Nov 2001 11:41:22 +0000 Subject: Patch from Philippe to use precision argument to differentiate between SString constructors based on int and double. --- include/SString.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/SString.h') diff --git a/include/SString.h b/include/SString.h index ff97c0c76..2f096bfb0 100644 --- a/include/SString.h +++ b/include/SString.h @@ -91,9 +91,9 @@ public: s = StringDup(number); sSize = sLen = (s) ? strlen(s) : 0; } - SString(double d) : sizeGrowth(sizeGrowthDefault) { + SString(double d, int precision) : sizeGrowth(sizeGrowthDefault) { char number[32]; - sprintf(number, "%.6f", d); + sprintf(number, "%.*f", precision, d); s = StringDup(number); sSize = sLen = (s) ? strlen(s) : 0; } -- cgit v1.2.3