[vlc-commits] win32: dirs-uap: fix indentation

Steve Lhomme git at videolan.org
Thu Apr 9 07:52:02 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Apr  6 12:54:23 2020 +0200| [06a6a3bc40cf0517fbeea2c25de1032642584b53] | committer: Steve Lhomme

win32: dirs-uap: fix indentation

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=06a6a3bc40cf0517fbeea2c25de1032642584b53
---

 src/win32/dirs-uap.c | 69 +++++++++++++++++++++++++---------------------------
 1 file changed, 33 insertions(+), 36 deletions(-)

diff --git a/src/win32/dirs-uap.c b/src/win32/dirs-uap.c
index cf176e3c4a..4b97f36e4b 100644
--- a/src/win32/dirs-uap.c
+++ b/src/win32/dirs-uap.c
@@ -68,49 +68,46 @@ static char *config_GetShellDir(vlc_userdir_t csidl)
     HRESULT hr;
     IStorageFolder *folder = NULL;
 
-    {
-        IKnownFoldersStatics *knownFoldersStatics = NULL;
-        static const WCHAR *className = L"Windows.Storage.KnownFolders";
-        const UINT32 clen = wcslen(className);
+    IKnownFoldersStatics *knownFoldersStatics = NULL;
+    static const WCHAR *className = L"Windows.Storage.KnownFolders";
+    const UINT32 clen = wcslen(className);
 
-        HSTRING hClassName = NULL;
-        HSTRING_HEADER header;
-        hr = WindowsCreateStringReference(className, clen, &header, &hClassName);
-        if (FAILED(hr))
-            goto end_other;
+    HSTRING hClassName = NULL;
+    HSTRING_HEADER header;
+    hr = WindowsCreateStringReference(className, clen, &header, &hClassName);
+    if (FAILED(hr))
+        goto end_other;
 
-        hr = RoGetActivationFactory(hClassName, &IID_IKnownFoldersStatics, (void**)&knownFoldersStatics);
+    hr = RoGetActivationFactory(hClassName, &IID_IKnownFoldersStatics, (void**)&knownFoldersStatics);
 
-        if (FAILED(hr))
-            goto end_other;
+    if (FAILED(hr))
+        goto end_other;
 
-        if (!knownFoldersStatics) {
-            hr = E_FAIL;
-            goto end_other;
-        }
+    if (!knownFoldersStatics) {
+        hr = E_FAIL;
+        goto end_other;
+    }
 
-        switch (csidl) {
-        case VLC_HOME_DIR:
-            hr = IKnownFoldersStatics_get_DocumentsLibrary(knownFoldersStatics, &folder);
-            break;
-        case VLC_MUSIC_DIR:
-            hr = IKnownFoldersStatics_get_MusicLibrary(knownFoldersStatics, &folder);
-            break;
-        case VLC_PICTURES_DIR:
-            hr = IKnownFoldersStatics_get_PicturesLibrary(knownFoldersStatics, &folder);
-            break;
-        case VLC_VIDEOS_DIR:
-            hr = IKnownFoldersStatics_get_VideosLibrary(knownFoldersStatics, &folder);
-            break;
-        default:
-            hr = E_NOTIMPL;
-        }
+    switch (csidl) {
+    case VLC_HOME_DIR:
+        hr = IKnownFoldersStatics_get_DocumentsLibrary(knownFoldersStatics, &folder);
+        break;
+    case VLC_MUSIC_DIR:
+        hr = IKnownFoldersStatics_get_MusicLibrary(knownFoldersStatics, &folder);
+        break;
+    case VLC_PICTURES_DIR:
+        hr = IKnownFoldersStatics_get_PicturesLibrary(knownFoldersStatics, &folder);
+        break;
+    case VLC_VIDEOS_DIR:
+        hr = IKnownFoldersStatics_get_VideosLibrary(knownFoldersStatics, &folder);
+        break;
+    default: vlc_assert_unreachable();
+    }
 
 end_other:
-        WindowsDeleteString(hClassName);
-        if (knownFoldersStatics)
-            IKnownFoldersStatics_Release(knownFoldersStatics);
-    }
+    WindowsDeleteString(hClassName);
+    if (knownFoldersStatics)
+        IKnownFoldersStatics_Release(knownFoldersStatics);
 
     if( FAILED(hr) || folder == NULL )
         return NULL;



More information about the vlc-commits mailing list