diff options
author | nyamatongwe <unknown> | 2004-02-26 10:40:11 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2004-02-26 10:40:11 +0000 |
commit | 4adadeb7ced618cc053403f133896fe1284a34a0 (patch) | |
tree | 6ad36b525301a0cf153a19e6fa27f350233be9f1 /src/PropSet.cxx | |
parent | 0651516f3f783f9aa970102d3b7ce986bddf2b29 (diff) | |
download | scintilla-mirror-4adadeb7ced618cc053403f133896fe1284a34a0.tar.gz |
Bruce moved the constructors from number types out of line.
Diffstat (limited to 'src/PropSet.cxx')
-rw-r--r-- | src/PropSet.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/PropSet.cxx b/src/PropSet.cxx index a12e074cc..41b2d5eff 100644 --- a/src/PropSet.cxx +++ b/src/PropSet.cxx @@ -76,6 +76,21 @@ bool EqualCaseInsensitive(const char *a, const char *b) { // implementations of the SString members here as well, so // that I can quickly see what effect this has. + +SString::SString(int i) : sizeGrowth(sizeGrowthDefault) { + char number[32]; + sprintf(number, "%0d", i); + s = StringAllocate(number); + sSize = sLen = (s) ? strlen(s) : 0; +} + +SString::SString(double d, int precision) : sizeGrowth(sizeGrowthDefault) { + char number[32]; + sprintf(number, "%.*f", precision, d); + s = StringAllocate(number); + sSize = sLen = (s) ? strlen(s) : 0; +} + bool SString::grow(lenpos_t lenNew) { while (sizeGrowth * 6 < lenNew) { sizeGrowth *= 2; |