extracted MPModifiedKey, fixed autotype obfuscation to correctly use modifiers

This commit is contained in:
michael starke
2017-01-26 12:34:12 +01:00
parent 1bf75fd0b1
commit fef22bce05
9 changed files with 89 additions and 47 deletions

24
MacPass/MPModifiedKey.m Normal file
View File

@@ -0,0 +1,24 @@
//
// MPModifiedKey.m
// MacPass
//
// Created by Michael Starke on 26/01/2017.
// Copyright © 2017 HicknHack Software GmbH. All rights reserved.
//
#import "MPModifiedKey.h"
@implementation NSValue(NSValueMPModifiedKeyExtensions)
- (MPModifiedKey)modifiedKeyValue {
MPModifiedKey key;
[self getValue:&key];
return key;
}
+ (instancetype)valueWithModifiedKey:(MPModifiedKey)key {
return [NSValue valueWithBytes:&key objCType:@encode(MPModifiedKey)];
}
@end