summaryrefslogtreecommitdiff
path: root/macosx/PcsxrMemCardController.m
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-09-10 18:43:18 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-09-10 18:43:18 +0000
commit4b4f074b6659f33b4f9e1c9784861409d8debd97 (patch)
tree0fbd7f1ea28c9431cd8bafbaaac5d689d55d5dd6 /macosx/PcsxrMemCardController.m
parenta3ac4842bd5c7058b1363f7d3307f61724fc7178 (diff)
downloadpcsxr-4b4f074b6659f33b4f9e1c9784861409d8debd97.tar.gz
Convert Objective-C code to modern syntax, mainly for the NSDictionaries.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@87115 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/PcsxrMemCardController.m')
-rwxr-xr-xmacosx/PcsxrMemCardController.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/macosx/PcsxrMemCardController.m b/macosx/PcsxrMemCardController.m
index 18c63cbf..7ad50914 100755
--- a/macosx/PcsxrMemCardController.m
+++ b/macosx/PcsxrMemCardController.m
@@ -72,7 +72,7 @@
- (void)memoryCardDidChangeNotification:(NSNotification *)aNote
{
NSDictionary *dict = [aNote userInfo];
- NSNumber *theNum = [dict objectForKey:memCardChangeNumberKey];
+ NSNumber *theNum = dict[memCardChangeNumberKey];
[self setupValues: theNum ? [theNum intValue] : 3];
}
@@ -119,7 +119,7 @@
int cardSize, freeConsBlocks, availBlocks;
- if ([[[fromCard memoryArray] objectAtIndex:selectedIndex] flagNameIndex] == memFlagFree) {
+ if ([[fromCard memoryArray][selectedIndex] flagNameIndex] == memFlagFree) {
NSBeep();
return;
}
@@ -128,7 +128,7 @@
freeConsBlocks = [toCard indexOfFreeBlocksWithSize:cardSize];
availBlocks = [toCard availableBlocks];
if (freeConsBlocks == -1 && availBlocks >= cardSize) {
- PcsxrMemoryObject *tmpmemobj = [fromCard.memoryArray objectAtIndex:selectedIndex];
+ PcsxrMemoryObject *tmpmemobj = (fromCard.memoryArray)[selectedIndex];
NSInteger copyOK = NSRunInformationalAlertPanel(NSLocalizedString(@"Free Size", nil), NSLocalizedString(@"Memory card %i does not have enough free consecutive blocks.\n\nIn order to copy over \"%@ (%@),\" memory card %i must be compressed. Compressing memory cards will make deleted blocks unrecoverable.\n\nDo you want to continue?", nil), NSLocalizedString(@"Yes", nil), NSLocalizedString(@"No", nil), nil, cardnum, tmpmemobj.englishName, tmpmemobj.sjisName, cardnum);
if (copyOK != NSAlertDefaultReturn) {
return;
@@ -195,7 +195,7 @@
NSInteger selectedIndex = [selected firstIndex];
- PcsxrMemoryObject *tmpObj = [[curCard memoryArray] objectAtIndex:selectedIndex];
+ PcsxrMemoryObject *tmpObj = [curCard memoryArray][selectedIndex];
if (tmpObj.flagNameIndex == memFlagFree) {
NSBeep();