Skip to content

Commit debc5cb

Browse files
Merge branch 'mkirk/compiler-warnings'
2 parents 97bc4ea + 6a1c548 commit debc5cb

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

AxolotlKit/Classes/Prekeys/PreKeyRecord.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#import <Curve25519Kit/Curve25519.h>
66
#import <Foundation/Foundation.h>
77

8+
NS_ASSUME_NONNULL_BEGIN
89

910
@interface PreKeyRecord : NSObject <NSSecureCoding>
1011

@@ -13,9 +14,11 @@
1314
@property (nonatomic, readonly, nullable) NSDate *createdAt;
1415

1516
- (instancetype)initWithId:(int)identifier
16-
keyPair:(ECKeyPair*)keyPair
17+
keyPair:(ECKeyPair *)keyPair
1718
createdAt:(NSDate *)createdAt;
1819

1920
- (void)setCreatedAtToNow;
2021

2122
@end
23+
24+
NS_ASSUME_NONNULL_END

AxolotlKit/Classes/Prekeys/PreKeyRecord.m

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
#import "PreKeyRecord.h"
1010

11+
NS_ASSUME_NONNULL_BEGIN
12+
1113
static NSString* const kCoderPreKeyId = @"kCoderPreKeyId";
1214
static NSString* const kCoderPreKeyPair = @"kCoderPreKeyPair";
1315
static NSString* const kCoderCreatedAt = @"kCoderCreatedAt";
@@ -35,7 +37,7 @@ - (instancetype)initWithId:(int)identifier
3537
return self;
3638
}
3739

38-
- (id)initWithCoder:(NSCoder *)aDecoder {
40+
- (nullable id)initWithCoder:(NSCoder *)aDecoder {
3941
return [self initWithId:[aDecoder decodeIntForKey:kCoderPreKeyId]
4042
keyPair:[aDecoder decodeObjectOfClass:[ECKeyPair class] forKey:kCoderPreKeyPair]
4143
createdAt:[aDecoder decodeObjectOfClass:[NSDate class] forKey:kCoderCreatedAt]];
@@ -54,3 +56,5 @@ - (void)setCreatedAtToNow {
5456
}
5557

5658
@end
59+
60+
NS_ASSUME_NONNULL_END

AxolotlKit/Classes/Prekeys/SignedPrekeyRecord.h

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#import "PreKeyRecord.h"
77
#import <Curve25519Kit/Curve25519.h>
88

9+
NS_ASSUME_NONNULL_BEGIN
10+
911
@interface SignedPreKeyRecord : PreKeyRecord <NSSecureCoding>
1012

1113
@property (nonatomic, readonly) NSData *signature;
@@ -19,3 +21,5 @@
1921
- (void)markAsAcceptedByService;
2022

2123
@end
24+
25+
NS_ASSUME_NONNULL_END

AxolotlKit/Classes/Prekeys/SignedPrekeyRecord.m

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
#import "SignedPrekeyRecord.h"
66

7+
NS_ASSUME_NONNULL_BEGIN
8+
79
static NSString* const kCoderPreKeyId = @"kCoderPreKeyId";
810
static NSString* const kCoderPreKeyPair = @"kCoderPreKeyPair";
911
static NSString* const kCoderPreKeyDate = @"kCoderPreKeyDate";
@@ -52,7 +54,7 @@ - (instancetype)initWithId:(int)identifier keyPair:(ECKeyPair *)keyPair signatur
5254
return self;
5355
}
5456

55-
- (id)initWithCoder:(NSCoder *)aDecoder{
57+
- (nullable id)initWithCoder:(NSCoder *)aDecoder{
5658
return [self initWithId:[aDecoder decodeIntForKey:kCoderPreKeyId]
5759
keyPair:[aDecoder decodeObjectOfClass:[ECKeyPair class] forKey:kCoderPreKeyPair]
5860
signature:[aDecoder decodeObjectOfClass:[NSData class] forKey:kCoderPreKeySignature]
@@ -79,3 +81,5 @@ - (void)markAsAcceptedByService
7981
}
8082

8183
@end
84+
85+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)