[Libreoffice-commits] core.git: avmedia/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 8 11:41:44 UTC 2019


 avmedia/source/vlc/wrapper/SymbolLoader.hxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit eb6410b5cf5140a80a6d9703f26fc9a969996cfa
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Nov 8 09:37:34 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Nov 8 12:40:39 2019 +0100

    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 at redhat.com>
    Tested-by: Stephan Bergmann <sbergman at redhat.com>

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 );


More information about the Libreoffice-commits mailing list