From a38829c1e2b938a783e15dc2d5fe4938c4f2c118 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Wed, 29 Oct 2014 21:55:18 -0400 Subject: [PATCH] Match the define name to its value. --- MasterPassword/ObjC/MPAppDelegate_Store.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MasterPassword/ObjC/MPAppDelegate_Store.m b/MasterPassword/ObjC/MPAppDelegate_Store.m index 36172722..13109376 100644 --- a/MasterPassword/ObjC/MPAppDelegate_Store.m +++ b/MasterPassword/ObjC/MPAppDelegate_Store.m @@ -14,7 +14,7 @@ #define STORE_OPTIONS #endif -#define MPStoreMigrationLevelKey @"MPMigrationLevelLocalStoreKey" +#define MPMigrationLevelLocalStoreKey @"MPMigrationLevelLocalStoreKey" typedef NS_ENUM( NSInteger, MPStoreMigrationLevel ) { MPStoreMigrationLevelV1, @@ -308,7 +308,7 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted ); - (void)migrateStore { - MPStoreMigrationLevel migrationLevel = (signed)[[NSUserDefaults standardUserDefaults] integerForKey:MPStoreMigrationLevelKey]; + MPStoreMigrationLevel migrationLevel = (signed)[[NSUserDefaults standardUserDefaults] integerForKey:MPMigrationLevelLocalStoreKey]; if (migrationLevel >= MPStoreMigrationLevelCurrent) // Local store up-to-date. return; @@ -323,7 +323,7 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted ); return; } - [[NSUserDefaults standardUserDefaults] setInteger:MPStoreMigrationLevelCurrent forKey:MPStoreMigrationLevelKey]; + [[NSUserDefaults standardUserDefaults] setInteger:MPStoreMigrationLevelCurrent forKey:MPMigrationLevelLocalStoreKey]; inf( @"Successfully migrated old to new local store." ); if (![[NSUserDefaults standardUserDefaults] synchronize]) wrn( @"Couldn't synchronize after store migration." );