From 31cfc73a09a8685cbab20502b4bc132e98e2feb5 Mon Sep 17 00:00:00 2001 From: Matthew Parlane Date: Tue, 11 Mar 2014 00:30:55 +1300 Subject: Fixes spacing for "for", "while", "switch" and "if" Also moved && and || to ends of lines instead of start. Fixed misc vertical alignments and some { needed newlining. --- Source/Core/Common/CDUtils.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'Source/Core/Common/CDUtils.cpp') diff --git a/Source/Core/Common/CDUtils.cpp b/Source/Core/Common/CDUtils.cpp index 2f1c24f146..4dfdcacd64 100644 --- a/Source/Core/Common/CDUtils.cpp +++ b/Source/Core/Common/CDUtils.cpp @@ -73,11 +73,11 @@ std::vector cdio_get_devices() std::vector drives; kern_result = IOMasterPort( MACH_PORT_NULL, &master_port ); - if( kern_result != KERN_SUCCESS ) + if (kern_result != KERN_SUCCESS) return( drives ); classes_to_match = IOServiceMatching( kIOCDMediaClass ); - if( classes_to_match == nullptr ) + if (classes_to_match == nullptr) return( drives ); CFDictionarySetValue( classes_to_match, @@ -85,11 +85,11 @@ std::vector cdio_get_devices() kern_result = IOServiceGetMatchingServices( master_port, classes_to_match, &media_iterator ); - if( kern_result != KERN_SUCCESS) + if (kern_result != KERN_SUCCESS) return( drives ); next_media = IOIteratorNext( media_iterator ); - if( next_media != 0 ) + if (next_media != 0) { char psz_buf[0x32]; size_t dev_path_length; @@ -101,7 +101,7 @@ std::vector cdio_get_devices() IORegistryEntryCreateCFProperty( next_media, CFSTR( kIOBSDNameKey ), kCFAllocatorDefault, 0 ); - if( str_bsd_path == nullptr ) + if (str_bsd_path == nullptr) { IOObjectRelease( next_media ); continue; @@ -113,12 +113,12 @@ std::vector cdio_get_devices() snprintf( psz_buf, sizeof(psz_buf), "%s%c", _PATH_DEV, 'r' ); dev_path_length = strlen( psz_buf ); - if( CFStringGetCString( (CFStringRef)str_bsd_path, + if (CFStringGetCString( (CFStringRef)str_bsd_path, (char*)&psz_buf + dev_path_length, sizeof(psz_buf) - dev_path_length, kCFStringEncodingASCII)) { - if(psz_buf != nullptr) + if (psz_buf != nullptr) { std::string str = psz_buf; drives.push_back(str); @@ -127,7 +127,7 @@ std::vector cdio_get_devices() CFRelease( str_bsd_path ); IOObjectRelease( next_media ); - } while( ( next_media = IOIteratorNext( media_iterator ) ) != 0 ); + } while (( next_media = IOIteratorNext( media_iterator ) ) != 0); } IOObjectRelease( media_iterator ); return drives; @@ -175,7 +175,7 @@ static bool is_cdrom(const std::string& drive, char *mnttype) bool is_cd=false; // If it does exist, verify that it is a cdrom/dvd drive int cdfd = open(drive.c_str(), (O_RDONLY|O_NONBLOCK), 0); - if ( cdfd >= 0 ) + if (cdfd >= 0) { #ifdef __linux__ if (ioctl(cdfd, CDROM_GET_CAPABILITY, 0) != -1) -- cgit v1.2.3