From 0ce3d2e1cc9ae70bc7f6146ce38c5dcc1af4a3c6 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Tue, 4 Jun 2013 14:17:34 -0700 Subject: MAINT-2740 convert to std::string based API for OutputDebug wrapper cleanliness after sage counsel (slight refrain) --- indra/llcommon/llerror.cpp | 8 +++++--- indra/llcommon/llerror.h | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp index 10b8b3105b..c2daa6902f 100755 --- a/indra/llcommon/llerror.cpp +++ b/indra/llcommon/llerror.cpp @@ -201,7 +201,7 @@ namespace { virtual void recordMessage(LLError::ELevel level, const std::string& message) { - LL_WINDOWS_OUTPUT_DEBUG(wstring_to_utf16str(utf8str_to_wstring(message)).c_str()); + LL_WINDOWS_OUTPUT_DEBUG(message); } }; #endif @@ -1400,13 +1400,15 @@ namespace LLError } #if LL_WINDOWS && !defined(LL_RELEASE_FOR_DOWNLOAD) - void LLOutputDebugUTF16(const unsigned short* s) + void LLOutputDebugUTF8(const std::string& s) { // Be careful not to enable this in non-debug builds as there are bad interactions between the // exceptions thrown by this function and the handling of stacks in coroutine fibers. BUG-2707 // #if defined(_DEBUG) - OutputDebugString(s); + // Need UTF16 for Unicode OutputDebugString + // + OutputDebugString(utf8str_to_utf16str(s).c_str()); OutputDebugString(TEXT("\n")); #endif } diff --git a/indra/llcommon/llerror.h b/indra/llcommon/llerror.h index 1bc93b4def..bf8f488aba 100755 --- a/indra/llcommon/llerror.h +++ b/indra/llcommon/llerror.h @@ -200,7 +200,7 @@ namespace LLError }; #if LL_WINDOWS && !defined(LL_RELEASE_FOR_DOWNLOAD) - void LLOutputDebugUTF16(const unsigned short* s); + void LLOutputDebugUTF8(const std::string& s); #endif } @@ -209,7 +209,7 @@ namespace LLError // Macro accepting a wchar_t* for display in windows debugging console in debug builds only // (wchar_t flavor chosen for maximal utility with unicode text debugging) // - #define LL_WINDOWS_OUTPUT_DEBUG(a) LLError::LLOutputDebugUTF16((a)) + #define LL_WINDOWS_OUTPUT_DEBUG(a) LLError::LLOutputDebugUTF8((a)) #else #define LL_WINDOWS_OUTPUT_DEBUG(a) #endif -- cgit v1.2.3