summaryrefslogtreecommitdiff
path: root/macosx/Source
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2014-07-21 20:24:55 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2014-07-21 20:24:55 +0000
commit0a350e09575dda4ad7c5bb21c5fe5edc659f1d59 (patch)
tree42182554528e73672a4a16a59504babd367e3be9 /macosx/Source
parent50630078a5b4891fe0b50a6cadb7514bfc8d4f11 (diff)
downloadpcsxr-0a350e09575dda4ad7c5bb21c5fe5edc659f1d59.tar.gz
OS X: Modernize the Cocoa code using Xcode 6.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@91019 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/Source')
-rw-r--r--macosx/Source/CheatController.h4
-rw-r--r--macosx/Source/LaunchArg.h4
-rw-r--r--macosx/Source/LaunchArg.m4
-rw-r--r--macosx/Source/MemBadgeView.m2
-rw-r--r--macosx/Source/PcsxrHexadecimalFormatter.m4
-rw-r--r--macosx/Source/PcsxrMemCardArray.h6
-rw-r--r--macosx/Source/PcsxrMemCardArray.m2
-rw-r--r--macosx/Source/PcsxrMemCardHandler.m4
-rw-r--r--macosx/Source/PcsxrMemoryObject.h2
-rw-r--r--macosx/Source/PcsxrMemoryObject.m2
-rw-r--r--macosx/Source/PcsxrPlugin.h6
-rw-r--r--macosx/Source/PcsxrPlugin.m2
-rw-r--r--macosx/Source/PcsxrPluginHandler.m4
-rw-r--r--macosx/Source/PluginList.h2
-rw-r--r--macosx/Source/PluginList.m2
15 files changed, 25 insertions, 25 deletions
diff --git a/macosx/Source/CheatController.h b/macosx/Source/CheatController.h
index c56f2a68..04b00a46 100644
--- a/macosx/Source/CheatController.h
+++ b/macosx/Source/CheatController.h
@@ -12,7 +12,7 @@
@property (readwrite) uint32_t cheatAddress;
@property (readwrite) uint16_t cheatValue;
-- (instancetype)initWithAddress:(uint32_t)add value:(uint16_t)val;
+- (instancetype)initWithAddress:(uint32_t)add value:(uint16_t)val NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithCheatCode:(CheatCode *)theCheat;
@end
@@ -21,7 +21,7 @@
@property (readwrite, strong) NSString *cheatName;
@property (readwrite, getter = isEnabled) BOOL enabled;
-- (instancetype)initWithCheat:(Cheat *)theCheat;
+- (instancetype)initWithCheat:(Cheat *)theCheat NS_DESIGNATED_INITIALIZER;
@end
@interface CheatController : NSWindowController <NSWindowDelegate, NSTableViewDelegate>
diff --git a/macosx/Source/LaunchArg.h b/macosx/Source/LaunchArg.h
index 2584123d..28e62fcb 100644
--- a/macosx/Source/LaunchArg.h
+++ b/macosx/Source/LaunchArg.h
@@ -19,7 +19,7 @@ typedef enum _LaunchArgOrder {
@property (readonly, copy, nonatomic) dispatch_block_t theBlock;
@property (readonly, strong) NSString *argument;
-- (id)initWithLaunchOrder:(unsigned)order block:(dispatch_block_t)block argument:(NSString*)arg;
-- (id)initWithLaunchOrder:(unsigned)order argument:(NSString*)arg block:(dispatch_block_t)block;
+- (instancetype)initWithLaunchOrder:(unsigned)order block:(dispatch_block_t)block argument:(NSString*)arg NS_DESIGNATED_INITIALIZER;
+- (instancetype)initWithLaunchOrder:(unsigned)order argument:(NSString*)arg block:(dispatch_block_t)block;
- (void)addToDictionary:(NSMutableDictionary*)toAdd;
@end
diff --git a/macosx/Source/LaunchArg.m b/macosx/Source/LaunchArg.m
index dca47a7b..56569125 100644
--- a/macosx/Source/LaunchArg.m
+++ b/macosx/Source/LaunchArg.m
@@ -23,12 +23,12 @@
_theBlock = [theBlock copy];
}
-- (id)initWithLaunchOrder:(unsigned)order argument:(NSString*)arg block:(dispatch_block_t)block
+- (instancetype)initWithLaunchOrder:(unsigned)order argument:(NSString*)arg block:(dispatch_block_t)block
{
return [self initWithLaunchOrder:order block:block argument:arg];
}
-- (id)initWithLaunchOrder:(unsigned)order block:(dispatch_block_t)block argument:(NSString*)arg
+- (instancetype)initWithLaunchOrder:(unsigned)order block:(dispatch_block_t)block argument:(NSString*)arg
{
if (self = [super init]) {
self.launchOrder = order;
diff --git a/macosx/Source/MemBadgeView.m b/macosx/Source/MemBadgeView.m
index e15a6302..95157ea7 100644
--- a/macosx/Source/MemBadgeView.m
+++ b/macosx/Source/MemBadgeView.m
@@ -11,7 +11,7 @@
@implementation MemBadgeView
//TODO: also include the memory count in the view as well.
-- (id)initWithFrame:(NSRect)frame
+- (instancetype)initWithFrame:(NSRect)frame
{
self = [super initWithFrame:frame];
if (self) {
diff --git a/macosx/Source/PcsxrHexadecimalFormatter.m b/macosx/Source/PcsxrHexadecimalFormatter.m
index 550a7cb1..e0ea5bdf 100644
--- a/macosx/Source/PcsxrHexadecimalFormatter.m
+++ b/macosx/Source/PcsxrHexadecimalFormatter.m
@@ -22,7 +22,7 @@
self.hexFormatString = [NSString stringWithFormat:@"0x%%0%ilx", hexPadding];
}
-- (id)init
+- (instancetype)init
{
if (self = [super init]) {
#ifdef __LP64__
@@ -34,7 +34,7 @@
return self;
}
-- (id)initWithCoder:(NSCoder *)aDecoder
+- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
if (self = [super initWithCoder:aDecoder]) {
#ifdef __LP64__
diff --git a/macosx/Source/PcsxrMemCardArray.h b/macosx/Source/PcsxrMemCardArray.h
index 21b45f3c..584118b6 100644
--- a/macosx/Source/PcsxrMemCardArray.h
+++ b/macosx/Source/PcsxrMemCardArray.h
@@ -11,7 +11,7 @@
@interface PcsxrMemCardArray : NSObject
-- (id)initWithMemoryCardNumber:(int)carNum;
+- (instancetype)initWithMemoryCardNumber:(int)carNum NS_DESIGNATED_INITIALIZER;
- (void)deleteMemoryBlocksAtIndex:(int)slotnum;
- (void)compactMemory;
@@ -21,14 +21,14 @@
* @abstract Blocks that are free from any data
* @result free blocks
*/
-- (int)freeBlocks;
+@property (readonly) int freeBlocks;
/**
* @fn availableBlocks
* @abstract Blocks that have been deleted
* @result free blocks
*/
-- (int)availableBlocks;
+@property (readonly) int availableBlocks;
- (int)memorySizeAtIndex:(int)idx;
- (BOOL)moveBlockAtIndex:(int)idx toMemoryCard:(PcsxrMemCardArray*)otherCard;
- (int)indexOfFreeBlocksWithSize:(int)asize;
diff --git a/macosx/Source/PcsxrMemCardArray.m b/macosx/Source/PcsxrMemCardArray.m
index 57de81ae..dbea6bc7 100644
--- a/macosx/Source/PcsxrMemCardArray.m
+++ b/macosx/Source/PcsxrMemCardArray.m
@@ -91,7 +91,7 @@ static inline void ClearMemcardData(char *to, int dsti, char *str)
}
}
-- (id)initWithMemoryCardNumber:(int)carNum
+- (instancetype)initWithMemoryCardNumber:(int)carNum
{
NSParameterAssert(carNum == 1 || carNum == 2);
if (self = [super init]) {
diff --git a/macosx/Source/PcsxrMemCardHandler.m b/macosx/Source/PcsxrMemCardHandler.m
index 654ade0e..953a5f84 100644
--- a/macosx/Source/PcsxrMemCardHandler.m
+++ b/macosx/Source/PcsxrMemCardHandler.m
@@ -27,7 +27,7 @@
return utisupport;
}
-- (id)initWithWindow:(NSWindow *)window
+- (instancetype)initWithWindow:(NSWindow *)window
{
self = [super initWithWindow:window];
if (self) {
@@ -37,7 +37,7 @@
return self;
}
-- (id)init
+- (instancetype)init
{
return self = [self initWithWindowNibName:@"PcsxrMemCard"];
}
diff --git a/macosx/Source/PcsxrMemoryObject.h b/macosx/Source/PcsxrMemoryObject.h
index 539d0829..215b948b 100644
--- a/macosx/Source/PcsxrMemoryObject.h
+++ b/macosx/Source/PcsxrMemoryObject.h
@@ -26,7 +26,7 @@ typedef NS_ENUM(char, PCSXRMemFlags) {
+ (NSImage *)blankImage;
+ (PCSXRMemFlags)memFlagsFromBlockFlags:(unsigned char)blockFlags;
-- (id)initWithMcdBlock:(McdBlock *)infoBlockc startingIndex:(uint8_t)startIdx size:(uint8_t)memSize;
+- (instancetype)initWithMcdBlock:(McdBlock *)infoBlockc startingIndex:(uint8_t)startIdx size:(uint8_t)memSize NS_DESIGNATED_INITIALIZER;
@property (readonly, strong) NSString *englishName;
@property (readonly, strong) NSString *sjisName;
diff --git a/macosx/Source/PcsxrMemoryObject.m b/macosx/Source/PcsxrMemoryObject.m
index bd6db46c..db5dac65 100644
--- a/macosx/Source/PcsxrMemoryObject.m
+++ b/macosx/Source/PcsxrMemoryObject.m
@@ -136,7 +136,7 @@ static NSString *MemLabelEndLink;
return memFlagFree;
}
-- (id)initWithMcdBlock:(McdBlock *)infoBlock startingIndex:(uint8_t)startIdx size:(uint8_t)memSize
+- (instancetype)initWithMcdBlock:(McdBlock *)infoBlock startingIndex:(uint8_t)startIdx size:(uint8_t)memSize
{
if (self = [super init]) {
self.startingIndex = startIdx;
diff --git a/macosx/Source/PcsxrPlugin.h b/macosx/Source/PcsxrPlugin.h
index f2a0f854..14d6bca1 100644
--- a/macosx/Source/PcsxrPlugin.h
+++ b/macosx/Source/PcsxrPlugin.h
@@ -18,15 +18,15 @@
+ (char **)configEntriesForType:(int)type;
+ (NSArray *)pluginsPaths;
-- (id)initWithPath:(NSString *)aPath;
+- (instancetype)initWithPath:(NSString *)aPath NS_DESIGNATED_INITIALIZER;
-- (NSString *)displayVersion;
+@property (readonly, copy) NSString *displayVersion;
- (BOOL)hasAboutAs:(int)type;
- (BOOL)hasConfigureAs:(int)type;
- (long)runAs:(int)aType;
- (long)shutdownAs:(int)aType;
- (void)aboutAs:(int)type;
- (void)configureAs:(int)type;
-- (BOOL)verifyOK;
+@property (readonly) BOOL verifyOK;
@end
diff --git a/macosx/Source/PcsxrPlugin.m b/macosx/Source/PcsxrPlugin.m
index f326c040..219a88b4 100644
--- a/macosx/Source/PcsxrPlugin.m
+++ b/macosx/Source/PcsxrPlugin.m
@@ -118,7 +118,7 @@
return returnArray;
}
-- (id)initWithPath:(NSString *)aPath
+- (instancetype)initWithPath:(NSString *)aPath
{
if (!(self = [super init])) {
return nil;
diff --git a/macosx/Source/PcsxrPluginHandler.m b/macosx/Source/PcsxrPluginHandler.m
index 6e99932b..c94a8d2f 100644
--- a/macosx/Source/PcsxrPluginHandler.m
+++ b/macosx/Source/PcsxrPluginHandler.m
@@ -26,7 +26,7 @@
return utisupport;
}
-- (id)initWithWindow:(NSWindow *)window
+- (instancetype)initWithWindow:(NSWindow *)window
{
self = [super initWithWindow:window];
if (self) {
@@ -41,7 +41,7 @@
return @"AddPluginSheet";
}
-- (id)init
+- (instancetype)init
{
return self = [self initWithWindowNibName:@"AddPluginSheet"];
}
diff --git a/macosx/Source/PluginList.h b/macosx/Source/PluginList.h
index f6e0de55..0ffdf38e 100644
--- a/macosx/Source/PluginList.h
+++ b/macosx/Source/PluginList.h
@@ -18,7 +18,7 @@
- (void)refreshPlugins;
- (NSArray *)pluginsForType:(int)typeMask;
- (BOOL)hasPluginAtPath:(NSString *)path;
-- (BOOL)configured;
+@property (readonly) BOOL configured;
- (PcsxrPlugin *)activePluginForType:(int)type;
- (BOOL)setActivePlugin:(PcsxrPlugin *)plugin forType:(int)type;
diff --git a/macosx/Source/PluginList.m b/macosx/Source/PluginList.m
index 6b86bd90..cbe4cb95 100644
--- a/macosx/Source/PluginList.m
+++ b/macosx/Source/PluginList.m
@@ -35,7 +35,7 @@ const static int typeList[] = {PSE_LT_GPU, PSE_LT_SPU, PSE_LT_CDR, PSE_LT_PAD, P
return sPluginList;
}
-- (id)init
+- (instancetype)init
{
NSUInteger i;