@@ -21,22 +21,22 @@ #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" @implementation OFASN1Boolean -@synthesize booleanValue = _booleanValue; +@synthesize boolValue = _boolValue; -+ (instancetype)booleanWithBooleanValue: (bool)booleanValue ++ (instancetype)booleanWithBool: (bool)bool_ { - return [[[self alloc] initWithBooleanValue: booleanValue] autorelease]; + return [[[self alloc] initWithBool: bool_] autorelease]; } -- (instancetype)initWithBooleanValue: (bool)booleanValue +- (instancetype)initWithBool: (bool)bool_ { self = [super init]; - _booleanValue = booleanValue; + _boolValue = bool_; return self; } - (instancetype)initWithTagClass: (of_asn1_tag_class_t)tagClass @@ -62,11 +62,11 @@ } @catch (id e) { [self release]; @throw e; } - return [self initWithBooleanValue: !!value]; + return [self initWithBool: !!value]; } - (instancetype)init { OF_INVALID_INIT_METHOD @@ -75,11 +75,11 @@ - (OFData *)ASN1DERRepresentation { char buffer[] = { OF_ASN1_TAG_NUMBER_BOOLEAN, 1, - (_booleanValue ? 0xFF : 0x00) + (_boolValue ? 0xFF : 0x00) }; return [OFData dataWithItems: buffer count: sizeof(buffer)]; } @@ -93,23 +93,23 @@ if (![object isKindOfClass: [OFASN1Boolean class]]) return false; boolean = object; - if (boolean->_booleanValue != _booleanValue) + if (boolean->_boolValue != _boolValue) return false; return true; } - (unsigned long)hash { - return _booleanValue; + return _boolValue; } - (OFString *)description { - return (_booleanValue + return (_boolValue ? @"" : @""); } @end