diff options
| author | Christian Goetze (CG) <cg@lindenlab.com> | 2010-08-02 15:57:01 -0700 |
|---|---|---|
| committer | Christian Goetze (CG) <cg@lindenlab.com> | 2010-08-02 15:57:01 -0700 |
| commit | 4f6e814eaa7ae5cfc10e4e7d1f22e53be395a2f4 (patch) | |
| tree | be554f9f22996e00dada6da67f7e77eb0502b0f5 /indra/llcommon/llformat.cpp | |
| parent | f423a69864c40f760c1c7e64a2e544fd1dba77fb (diff) | |
| parent | 15247f086989a43881d79c1ee5416bb00721eb68 (diff) | |
Fix the reversion imported from viewer-hotfix via: "hg pull -r 1c95812ba38b ../viewer-public" - reviewed by richard
Diffstat (limited to 'indra/llcommon/llformat.cpp')
| -rw-r--r-- | indra/llcommon/llformat.cpp | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/indra/llcommon/llformat.cpp b/indra/llcommon/llformat.cpp index 689f649d0a..cf509bee14 100644 --- a/indra/llcommon/llformat.cpp +++ b/indra/llcommon/llformat.cpp @@ -37,40 +37,16 @@ #include <cstdarg> -// common used function with va_list argument -// wrapper for vsnprintf to be called from llformatXXX functions. -static void va_format(std::string& out, const char *fmt, va_list va) +std::string llformat(const char *fmt, ...) { char tstr[1024]; /* Flawfinder: ignore */ + va_list va; + va_start(va, fmt); #if LL_WINDOWS _vsnprintf(tstr, 1024, fmt, va); #else vsnprintf(tstr, 1024, fmt, va); /* Flawfinder: ignore */ #endif - out.assign(tstr); -} - -std::string llformat(const char *fmt, ...) -{ - std::string res; - va_list va; - va_start(va, fmt); - va_format(res, fmt, va); va_end(va); - return res; -} - -std::string llformat_to_utf8(const char *fmt, ...) -{ - std::string res; - va_list va; - va_start(va, fmt); - va_format(res, fmt, va); - va_end(va); - -#if LL_WINDOWS - // made converting to utf8. See EXT-8318. - res = ll_convert_string_to_utf8_string(res); -#endif - return res; + return std::string(tstr); } |
