From b4e052fc9d9848e91425b999a46c102e611fe963 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Thu, 24 Apr 2014 22:00:38 -0400 Subject: [PATCH] Small type fixes. --- MasterPassword/ObjC/MPAlgorithmV0.m | 2 +- MasterPassword/ObjC/iOS/MPCoachmarkViewController.h | 2 +- MasterPassword/ObjC/iOS/MPCoachmarkViewController.m | 4 ++-- MasterPassword/ObjC/iOS/MPEmergencyViewController.m | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/MasterPassword/ObjC/MPAlgorithmV0.m b/MasterPassword/ObjC/MPAlgorithmV0.m index 59f92e58..6638ca2d 100644 --- a/MasterPassword/ObjC/MPAlgorithmV0.m +++ b/MasterPassword/ObjC/MPAlgorithmV0.m @@ -33,7 +33,7 @@ - (NSString *)description { - return strf( @"<%@: version=%d>", NSStringFromClass( [self class] ), self.version ); + return strf( @"<%@: version=%lu>", NSStringFromClass( [self class] ), (unsigned long)self.version ); } - (BOOL)isEqual:(id)other { diff --git a/MasterPassword/ObjC/iOS/MPCoachmarkViewController.h b/MasterPassword/ObjC/iOS/MPCoachmarkViewController.h index c1f27b30..7ec95b51 100644 --- a/MasterPassword/ObjC/iOS/MPCoachmarkViewController.h +++ b/MasterPassword/ObjC/iOS/MPCoachmarkViewController.h @@ -21,7 +21,7 @@ @interface MPCoachmark : NSObject @property(nonatomic, strong) Class coachedClass; -@property(nonatomic) int coachedVersion; +@property(nonatomic) NSInteger coachedVersion; @property(nonatomic) BOOL coached; + (instancetype)coachmarkForClass:(Class)class version:(NSInteger)version; diff --git a/MasterPassword/ObjC/iOS/MPCoachmarkViewController.m b/MasterPassword/ObjC/iOS/MPCoachmarkViewController.m index f4ef41ea..d7f8af7f 100644 --- a/MasterPassword/ObjC/iOS/MPCoachmarkViewController.m +++ b/MasterPassword/ObjC/iOS/MPCoachmarkViewController.m @@ -42,12 +42,12 @@ - (BOOL)coached { - return [[NSUserDefaults standardUserDefaults] boolForKey:strf( @"%@.%d.coached", self.coachedClass, self.coachedVersion )]; + return [[NSUserDefaults standardUserDefaults] boolForKey:strf( @"%@.%ld.coached", self.coachedClass, (long)self.coachedVersion )]; } - (void)setCoached:(BOOL)coached { - [[NSUserDefaults standardUserDefaults] setBool:coached forKey:strf( @"%@.%d.coached", self.coachedClass, self.coachedVersion )]; + [[NSUserDefaults standardUserDefaults] setBool:coached forKey:strf( @"%@.%ld.coached", self.coachedClass, (long)self.coachedVersion )]; } @end diff --git a/MasterPassword/ObjC/iOS/MPEmergencyViewController.m b/MasterPassword/ObjC/iOS/MPEmergencyViewController.m index 187bfa5f..1f86f655 100644 --- a/MasterPassword/ObjC/iOS/MPEmergencyViewController.m +++ b/MasterPassword/ObjC/iOS/MPEmergencyViewController.m @@ -128,7 +128,7 @@ NSString *siteName = self.siteField.text; MPElementType siteType = [self siteType]; NSUInteger siteCounter = (NSUInteger)self.counterStepper.value; - self.counterLabel.text = strf( @"%d", siteCounter ); + self.counterLabel.text = strf( @"%lu", (unsigned long)siteCounter ); self.passwordLabel.text = nil; [self.activity startAnimating];