summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Madarasz <graham@lindenlab.com>2013-06-04 14:17:34 -0700
committerGraham Madarasz <graham@lindenlab.com>2013-06-04 14:17:34 -0700
commit0ce3d2e1cc9ae70bc7f6146ce38c5dcc1af4a3c6 (patch)
treef054c35197685368570d1f56306878a7cf8d62dc
parent0638f847c7c74f7981aea7181e4a0e6b23a2052d (diff)
MAINT-2740 convert to std::string based API for OutputDebug wrapper cleanliness after sage counsel (slight refrain)
-rwxr-xr-xindra/llcommon/llerror.cpp8
-rwxr-xr-xindra/llcommon/llerror.h4
-rwxr-xr-xindra/llui/llxuiparser.cpp8
3 files changed, 11 insertions, 9 deletions
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
diff --git a/indra/llui/llxuiparser.cpp b/indra/llui/llxuiparser.cpp
index 2859904302..ee570ce51f 100755
--- a/indra/llui/llxuiparser.cpp
+++ b/indra/llui/llxuiparser.cpp
@@ -1310,7 +1310,7 @@ void LLXUIParser::parserWarning(const std::string& message)
{
#ifdef LL_WINDOWS
// use Visual Studo friendly formatting of output message for easy access to originating xml
- LL_WINDOWS_OUTPUT_DEBUG(utf8str_to_utf16str(llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str())).c_str());
+ LL_WINDOWS_OUTPUT_DEBUG(llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()));
#else
Parser::parserWarning(message);
#endif
@@ -1319,7 +1319,7 @@ void LLXUIParser::parserWarning(const std::string& message)
void LLXUIParser::parserError(const std::string& message)
{
#ifdef LL_WINDOWS
- LL_WINDOWS_OUTPUT_DEBUG(utf8str_to_utf16str(llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str())).c_str());
+ LL_WINDOWS_OUTPUT_DEBUG(llformat("%s(%d):\t%s", mCurFileName.c_str(), mCurReadNode->getLineNumber(), message.c_str()));
#else
Parser::parserError(message);
#endif
@@ -1637,7 +1637,7 @@ void LLSimpleXUIParser::parserWarning(const std::string& message)
{
#ifdef LL_WINDOWS
// use Visual Studo friendly formatting of output message for easy access to originating xml
- LL_WINDOWS_OUTPUT_DEBUG(utf8str_to_utf16str(llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str())).c_str());
+ LL_WINDOWS_OUTPUT_DEBUG(llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()));
#else
Parser::parserWarning(message);
#endif
@@ -1646,7 +1646,7 @@ void LLSimpleXUIParser::parserWarning(const std::string& message)
void LLSimpleXUIParser::parserError(const std::string& message)
{
#ifdef LL_WINDOWS
- LL_WINDOWS_OUTPUT_DEBUG(utf8str_to_utf16str(llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str())).c_str());
+ LL_WINDOWS_OUTPUT_DEBUG(llformat("%s(%d):\t%s", mCurFileName.c_str(), LINE_NUMBER_HERE, message.c_str()));
#else
Parser::parserError(message);
#endif