summaryrefslogtreecommitdiff
path: root/vcl/win/window/salframe.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-04-12 14:17:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-04-13 09:28:44 +0200
commit639df4d76d545ca23021f69a9d738a9a92c148cd (patch)
tree87b20ea1518f6a878102a367c211cb6f93c554fd /vcl/win/window/salframe.cxx
parent9dce6f74b1b43293b40217c1163c8d4285251e97 (diff)
use more std::make_unique
Change-Id: I7d85cbc9105c5e0c4a8d9a69c4ac9d6dfc07eabd Reviewed-on: https://gerrit.libreoffice.org/70663 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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 16cdf0e8579f..bf2c15bca26d 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -4967,7 +4967,7 @@ static bool ImplHandleIMECompositionInput( WinSalFrame* pFrame,
LONG nTextLen = ImmGetCompositionStringW( hIMC, GCS_RESULTSTR, nullptr, 0 ) / sizeof( WCHAR );
if ( nTextLen >= 0 )
{
- auto pTextBuf = std::unique_ptr<WCHAR[]>(new WCHAR[nTextLen]);
+ auto pTextBuf = std::make_unique<WCHAR[]>(nTextLen);
ImmGetCompositionStringW( hIMC, GCS_RESULTSTR, pTextBuf.get(), nTextLen*sizeof( WCHAR ) );
aEvt.maText = OUString( o3tl::toU(pTextBuf.get()), static_cast<sal_Int32>(nTextLen) );
}
@@ -4993,7 +4993,7 @@ static bool ImplHandleIMECompositionInput( WinSalFrame* pFrame,
if ( nTextLen > 0 )
{
{
- auto pTextBuf = std::unique_ptr<WCHAR[]>(new WCHAR[nTextLen]);
+ auto pTextBuf = std::make_unique<WCHAR[]>(nTextLen);
ImmGetCompositionStringW( hIMC, GCS_COMPSTR, pTextBuf.get(), nTextLen*sizeof( WCHAR ) );
aEvt.maText = OUString( o3tl::toU(pTextBuf.get()), static_cast<sal_Int32>(nTextLen) );
}