summaryrefslogtreecommitdiff
path: root/Source/Core/Common/CDUtils.cpp
diff options
context:
space:
mode:
authorMatthew Parlane <parlane@gmail.com>2014-03-11 00:30:55 +1300
committerMatthew Parlane <parlane@gmail.com>2014-03-11 00:35:07 +1300
commit31cfc73a09a8685cbab20502b4bc132e98e2feb5 (patch)
treec7eb3a0906bab0eb711bd7c79166c96fe97ec488 /Source/Core/Common/CDUtils.cpp
parent4591464486d696a300cc914f6c2a3cce8af2d666 (diff)
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.
Diffstat (limited to 'Source/Core/Common/CDUtils.cpp')
-rw-r--r--Source/Core/Common/CDUtils.cpp18
1 files changed, 9 insertions, 9 deletions
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<std::string> cdio_get_devices()
std::vector<std::string> 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<std::string> 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<std::string> 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<std::string> 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<std::string> 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)