diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-04-26 17:36:57 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-04-26 17:37:13 +0200 |
commit | 979bd73144ea38168b3e536c46c762a7b46c8072 (patch) | |
tree | 61445181cee1d1aaa650fb5077af9ce8e311bd41 | |
parent | 99637fb4c69ad7f136acc69c2fc0a46f57b9ce67 (diff) |
Clean up uses of SAL_U/SAL_W: comphelper
Change-Id: I56976f91647c3969d5709e5f691f860bb97ed548
-rw-r--r-- | include/comphelper/windowserrorstring.hxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/include/comphelper/windowserrorstring.hxx b/include/comphelper/windowserrorstring.hxx index 34614fbfe93b..805c491c37e1 100644 --- a/include/comphelper/windowserrorstring.hxx +++ b/include/comphelper/windowserrorstring.hxx @@ -29,13 +29,8 @@ inline OUString WindowsErrorString(DWORD nErrorCode) nullptr) == 0) return OUString::number(nErrorCode, 16); - if (pMsgBuf[wcslen(pMsgBuf)-1] == '\n') - pMsgBuf[wcslen(pMsgBuf)-1] = '\0'; - - if (pMsgBuf[wcslen(pMsgBuf)-1] == '\r') - pMsgBuf[wcslen(pMsgBuf)-1] = '\0'; - - OUString result(SAL_U(pMsgBuf)); + OUString result(reinterpret_cast<sal_Unicode const *>(pMsgBuf)); + result.endsWith("\r\n", &result); LocalFree(pMsgBuf); |