diff options
author | karl <karl> | 2014-07-17 19:55:40 +0000 |
---|---|---|
committer | karl <karl> | 2014-07-17 19:55:40 +0000 |
commit | 297e69eab6b9705ec4cb538e9d7cd86581a66428 (patch) | |
tree | e841ea4a6533abf452a9f8a65d4d45c6091dcc41 | |
parent | 4d2476a38fe55006982e981f6c4e40aa0816df3e (diff) | |
download | tog-pegasus-297e69eab6b9705ec4cb538e9d7cd86581a66428.zip tog-pegasus-297e69eab6b9705ec4cb538e9d7cd86581a66428.tar.gz tog-pegasus-297e69eab6b9705ec4cb538e9d7cd86581a66428.tar.xz |
BUG#: 9913
TITLE: Unused code inserted into String.cpp in bug 9880
DESCRIPTION: Removes unused function
-rw-r--r-- | src/Pegasus/Common/String.cpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/Pegasus/Common/String.cpp b/src/Pegasus/Common/String.cpp index fab674f..ae63618 100644 --- a/src/Pegasus/Common/String.cpp +++ b/src/Pegasus/Common/String.cpp @@ -382,49 +382,6 @@ static inline size_t _copyToUTF8(char* dest, const Uint16* src, size_t n) return p - (Uint8*)dest; } -// Function to return a formatted char* from a va_list. -// Allocates space for the returned char* and repeats the -// build process until the allocated space is large enough -// to hold the result. This is internal only and the core function -// used by stringPrintf and stringVPrintf - -static char* _charVPrintf(const char* format, va_list ap) -{ - // Iniitial allocation size. This is a guess assuming that - // most printfs are one or two lines long - int allocSize = 256; - - int rtnSize; - char *p; - - // initial allocate for output - if ((p = (char*)malloc(allocSize)) == NULL) - { - return 0; - } - - // repeat formatting with increased realloc until it works. - do - { - rtnSize = vsnprintf(p, allocSize, format, ap); - - // return if successful if not negative and - // returns less than allocated size. - if (rtnSize > -1 && rtnSize < allocSize) - { - return p; - } - - // increment alloc size. Assumes that positive return is - // expected size and negative is error. - allocSize = (rtnSize > -1)? (rtnSize + 1) : allocSize * 2; - - } while((p = (char*)peg_inln_realloc(p, allocSize)) != NULL); - - // return error code if realloc failed - return 0; -} - //============================================================================== // // class CString |