IOSAD-121 Use constant for @"undefined". IOSAD-121
authorDirk Zimmermann <dz@pep.security>
Thu, 25 Jul 2019 10:47:04 +0200
branchIOSAD-121
changeset 1111b13b3c79ebad
parent 1110 d091bcef3ae4
child 1112 6b1cc49b1157
IOSAD-121 Use constant for @"undefined".
pEpObjCAdapter/PEPInternalSession.m
pEpObjCAdapter/PEPSession.m
     1.1 --- a/pEpObjCAdapter/PEPInternalSession.m	Thu Jul 25 10:47:04 2019 +0200
     1.2 +++ b/pEpObjCAdapter/PEPInternalSession.m	Thu Jul 25 10:47:04 2019 +0200
     1.3 @@ -25,6 +25,7 @@
     1.4  #import "NSNumber+PEPRating.h"
     1.5  #import "NSMutableDictionary+PEP.h"
     1.6  #import "PEPSync_Internal.h"
     1.7 +#import "PEPInternalConstants.h"
     1.8  
     1.9  #import "key_reset.h"
    1.10  
    1.11 @@ -824,7 +825,7 @@
    1.12        [NSNumber numberWithInteger:PEPRatingMistrust]: @"mistrust",
    1.13        [NSNumber numberWithInteger:PEPRatingB0rken]: @"b0rken",
    1.14        [NSNumber numberWithInteger:PEPRatingUnderAttack]: @"under_attack",
    1.15 -      [NSNumber numberWithInteger:PEPRatingUndefined]: @"undefined",
    1.16 +      [NSNumber numberWithInteger:PEPRatingUndefined]: kUndefined,
    1.17        };
    1.18      NSMutableDictionary *stringToRatingMutable = [NSMutableDictionary
    1.19                                                    dictionaryWithCapacity:
    1.20 @@ -853,7 +854,7 @@
    1.21      if (stringRating) {
    1.22          return stringRating;
    1.23      } else {
    1.24 -        return @"undefined";
    1.25 +        return kUndefined;
    1.26      }
    1.27  }
    1.28  
     2.1 --- a/pEpObjCAdapter/PEPSession.m	Thu Jul 25 10:47:04 2019 +0200
     2.2 +++ b/pEpObjCAdapter/PEPSession.m	Thu Jul 25 10:47:04 2019 +0200
     2.3 @@ -15,6 +15,7 @@
     2.4  #import "PEPMessageUtil.h"
     2.5  #import "NSNumber+PEPRating.h"
     2.6  #import "NSError+PEP+Internal.h"
     2.7 +#import "PEPInternalConstants.h"
     2.8  
     2.9  @implementation PEPSession
    2.10  
    2.11 @@ -365,7 +366,7 @@
    2.12  {
    2.13      PEPInternalSession *session = [PEPSessionProvider session];
    2.14      if (session == nil) {
    2.15 -        return @"undefined";
    2.16 +        return kUndefined;
    2.17      }
    2.18      return [session stringFromRating:rating];
    2.19  }