diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-10 20:47:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-11 11:20:43 +0200 |
commit | 2d582244680e7f6dec6e4a466e276f93ccb01dc9 (patch) | |
tree | b0e880ddfb3ce1ea2f47151b648e7fbb55132f08 /sal | |
parent | 74012c48d99634a7556a86f77e9522024f2afdb2 (diff) |
loplugin:flatten
Change-Id: I6560756eb63856a22b43e3e65a7b7843cd2d5376
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100447
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/rtl/ustring.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sal/rtl/ustring.cxx b/sal/rtl/ustring.cxx index 66e2fe03ce9d..d3bf1daedc78 100644 --- a/sal/rtl/ustring.cxx +++ b/sal/rtl/ustring.cxx @@ -543,20 +543,20 @@ void SAL_CALL rtl_uString_newFromAscii( rtl_uString** ppThis, *ppThis = rtl_uString_ImplAlloc( nLen ); OSL_ASSERT(*ppThis != nullptr); - if ( *ppThis ) - { - sal_Unicode* pBuffer = (*ppThis)->buffer; - do - { - assert(static_cast<unsigned char>(*pCharStr) < 0x80); // ASCII range - *pBuffer = *pCharStr; - pBuffer++; - pCharStr++; - } - while ( *pCharStr ); + if ( !(*ppThis) ) + return; - RTL_LOG_STRING_NEW( *ppThis ); + sal_Unicode* pBuffer = (*ppThis)->buffer; + do + { + assert(static_cast<unsigned char>(*pCharStr) < 0x80); // ASCII range + *pBuffer = *pCharStr; + pBuffer++; + pCharStr++; } + while ( *pCharStr ); + + RTL_LOG_STRING_NEW( *ppThis ); } void SAL_CALL rtl_uString_newFromCodePoints( |