@@ -137,16 +137,14 @@ return [ret autorelease]; } - (id)valueForUndefinedKey: (OFString *)key { - @throw [OFUndefinedKeyException exceptionWithObject: self - key: key]; + @throw [OFUndefinedKeyException exceptionWithObject: self key: key]; } -- (void)setValue: (id)value - forKey: (OFString *)key +- (void)setValue: (id)value forKey: (OFString *)key { void *pool = objc_autoreleasePoolPush(); size_t keyLength; char *name; SEL selector; @@ -153,12 +151,11 @@ OFMethodSignature *methodSignature; const char *valueType; if ((keyLength = key.UTF8StringLength) < 1) { objc_autoreleasePoolPop(pool); - [self setValue: value - forUndefinedKey: key]; + [self setValue: value forUndefinedKey: key]; return; } name = of_alloc(keyLength + 5, 1); @try { @@ -179,12 +176,11 @@ methodSignature.numberOfArguments != 3 || *methodSignature.methodReturnType != 'v' || *[methodSignature argumentTypeAtIndex: 0] != '@' || *[methodSignature argumentTypeAtIndex: 1] != ':') { objc_autoreleasePoolPop(pool); - [self setValue: value - forUndefinedKey: key]; + [self setValue: value forUndefinedKey: key]; return; } valueType = [methodSignature argumentTypeAtIndex: 2]; @@ -226,40 +222,36 @@ CASE('f', float, floatValue) CASE('d', double, doubleValue) #undef CASE default: objc_autoreleasePoolPop(pool); - [self setValue: value - forUndefinedKey: key]; + [self setValue: value forUndefinedKey: key]; return; } objc_autoreleasePoolPop(pool); } -- (void)setValue: (id)value - forKeyPath: (OFString *)keyPath +- (void)setValue: (id)value forKeyPath: (OFString *)keyPath { void *pool = objc_autoreleasePoolPush(); OFArray *keys = [keyPath componentsSeparatedByString: @"."]; size_t keysCount = keys.count; id object = self; size_t i = 0; for (OFString *key in keys) { if (++i == keysCount) - [object setValue: value - forKey: key]; + [object setValue: value forKey: key]; else object = [object valueForKey: key]; } objc_autoreleasePoolPop(pool); } -- (void)setValue: (id)value - forUndefinedKey: (OFString *)key +- (void)setValue: (id)value forUndefinedKey: (OFString *)key { @throw [OFUndefinedKeyException exceptionWithObject: self key: key value: value]; }