summaryrefslogtreecommitdiff
path: root/vcl/win/window/salframe.cxx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-09-07 16:09:50 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2018-09-07 22:04:50 +0200
commitb18747fcee1ba8744e5cd63791dc9f3eb6848a56 (patch)
tree51d0216e5f58822e820861499605e145e563dff5 /vcl/win/window/salframe.cxx
parent694a6389e84d5b416cde6dde2d5eaa589a0a6493 (diff)
Fix some std::unique_ptr array allocs
Found by reviewing the output of and the code around git grep -n "unique_ptr.*new.*\[.*\]" | grep -v "\[\]" The onlineupdater code needs a little bit more attention. Change-Id: I8b70c7da7db60af52bfac12314a21602ede8bfc0 Reviewed-on: https://gerrit.libreoffice.org/60162 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl/win/window/salframe.cxx')
-rw-r--r--vcl/win/window/salframe.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 7b50f7f4cd09..ef6d7ff2827a 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -4987,12 +4987,12 @@ static bool ImplHandleIMECompositionInput( WinSalFrame* pFrame,
if ( nTextLen > 0 )
{
{
- auto pTextBuf = std::unique_ptr<WCHAR>(new WCHAR[nTextLen]);
+ auto pTextBuf = std::unique_ptr<WCHAR[]>(new WCHAR[nTextLen]);
ImmGetCompositionStringW( hIMC, GCS_COMPSTR, pTextBuf.get(), nTextLen*sizeof( WCHAR ) );
aEvt.maText = OUString( o3tl::toU(pTextBuf.get()), static_cast<sal_Int32>(nTextLen) );
}
- std::unique_ptr<BYTE> pAttrBuf;
+ std::unique_ptr<BYTE[]> pAttrBuf;
LONG nAttrLen = ImmGetCompositionStringW( hIMC, GCS_COMPATTR, nullptr, 0 );
if ( nAttrLen > 0 )
{