]> granicus.if.org Git - taglib/commitdiff
Styling
authorAlberto Fustinoni <alberto@aftnet.net>
Sun, 23 Oct 2016 11:17:49 +0000 (20:17 +0900)
committerAlberto Fustinoni <alberto@aftnet.net>
Sun, 23 Oct 2016 11:17:49 +0000 (20:17 +0900)
taglib/toolkit/tfilestream.cpp

index 54f7ffe9ef64384ff367665ddabdaf0decf8c392..cd582d062fade128ceb248e6f0d564b9e7ecf4be 100644 (file)
@@ -52,21 +52,17 @@ namespace
     const DWORD access = readOnly ? GENERIC_READ : (GENERIC_READ | GENERIC_WRITE);
 
        if(!path.wstr().empty())
-       {
 #if (_WIN32_WINNT >= 0x0602)
-               return CreateFile2(path.wstr().c_str(), access, FILE_SHARE_READ, OPEN_EXISTING, NULL);
+         return CreateFile2(path.wstr().c_str(), access, FILE_SHARE_READ, OPEN_EXISTING, NULL);
 #else
-               return CreateFileW(path.wstr().c_str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
+         return CreateFileW(path.wstr().c_str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
 #endif
-       }
        else if(!path.str().empty())
-       {
 #if (_WIN32_WINNT >= 0x0602)
-               return CreateFile2(path.toString().toCWString(), access, FILE_SHARE_READ, OPEN_EXISTING, NULL);
+         return CreateFile2(path.toString().toCWString(), access, FILE_SHARE_READ, OPEN_EXISTING, NULL);
 #else
-               return CreateFileA(path.str().c_str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
+         return CreateFileA(path.str().c_str(), access, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
 #endif
-       }
     else
       return InvalidFileHandle;
   }