diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-11-08 09:37:34 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-11-08 12:40:39 +0100 |
commit | eb6410b5cf5140a80a6d9703f26fc9a969996cfa (patch) | |
tree | 51fd13040b04d078e4a33aa3d8e8be51305b1ac6 /avmedia | |
parent | 725b7a37e760b660781b2d2740c6207559f01f44 (diff) |
Fix Windows --eanble-vlc errors and (clang-cl) warnings
Fix "no matching constructor" for
OUString( arCurrent, dwCurrentSize )
from wchar_t and loplugin:cstylecast, loplugin:nullptr, and
loplugin:stringconstant warnings.
Change-Id: Ibe0341afe14a8c0380a69e9cbf946e68f9c58391
Reviewed-on: https://gerrit.libreoffice.org/82264
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/vlc/wrapper/SymbolLoader.hxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/avmedia/source/vlc/wrapper/SymbolLoader.hxx b/avmedia/source/vlc/wrapper/SymbolLoader.hxx index 601aa62edd2a..aae124cb2575 100644 --- a/avmedia/source/vlc/wrapper/SymbolLoader.hxx +++ b/avmedia/source/vlc/wrapper/SymbolLoader.hxx @@ -46,21 +46,21 @@ struct ApiMap inline OUString GetVLCPath() { HKEY hKey; - wchar_t arCurrent[MAX_PATH]; + sal_Unicode arCurrent[MAX_PATH]; DWORD dwType, dwCurrentSize = sizeof( arCurrent ); //TODO: This one will work only with LibreOffice 32-bit + VLC 32-bit on Win x86_64. const LONG errorCore = ::RegOpenKeyExW( HKEY_LOCAL_MACHINE, L"SOFTWARE\\Wow6432Node\\VideoLAN\\VLC", 0, KEY_READ | KEY_WOW64_64KEY, &hKey ); if ( errorCore == ERROR_SUCCESS ) { - if ( ::RegQueryValueExW( hKey, L"InstallDir", NULL, &dwType, (LPBYTE) arCurrent, &dwCurrentSize ) == ERROR_SUCCESS && + if ( ::RegQueryValueExW( hKey, L"InstallDir", nullptr, &dwType, reinterpret_cast<LPBYTE>(arCurrent), &dwCurrentSize ) == ERROR_SUCCESS && dwType == REG_SZ ) { ::RegCloseKey( hKey ); dwCurrentSize -= 2; dwCurrentSize /= 2; - return OUString( arCurrent, dwCurrentSize ) + OUString::createFromAscii("\\"); + return OUString( arCurrent, dwCurrentSize ) + "\\"; } ::RegCloseKey( hKey ); |