@@ -39,11 +39,11 @@ return ret; } @implementation OFObject (KeyValueCoding) -- (id)valueForKey: (OFString*)key +- (id)valueForKey: (OFString *)key { SEL selector = sel_registerName([key UTF8String]); const char *typeEncoding = [self typeEncodingForSelector: selector]; id ret; @@ -83,11 +83,11 @@ ret = [self performSelector: selector]; break; #define CASE(encoding, type, method) \ case encoding: \ { \ - type (*getter)(id, SEL) = (type(*)(id, SEL)) \ + type (*getter)(id, SEL) = (type (*)(id, SEL)) \ [self methodForSelector: selector]; \ ret = [OFNumber method getter(self, selector)]; \ } \ break; CASE('B', bool, numberWithBool:) @@ -113,18 +113,18 @@ return [self valueForUndefinedKey: key]; return ret; } -- (id)valueForUndefinedKey: (OFString*)key +- (id)valueForUndefinedKey: (OFString *)key { @throw [OFUndefinedKeyException exceptionWithObject: self key: key]; } - (void)setValue: (id)value - forKey: (OFString*)key + forKey: (OFString *)key { size_t keyLength; char *name; SEL selector; const char *typeEncoding; @@ -176,20 +176,20 @@ switch (valueType) { case '@': case '#': { - void (*setter)(id, SEL, id) = (void(*)(id, SEL, id)) + void (*setter)(id, SEL, id) = (void (*)(id, SEL, id)) [self methodForSelector: selector]; setter(self, selector, value); } break; #define CASE(encoding, type, method) \ case encoding: \ { \ void (*setter)(id, SEL, type) = \ - (void(*)(id, SEL, type)) \ + (void (*)(id, SEL, type)) \ [self methodForSelector: selector]; \ setter(self, selector, [value method]); \ } \ break; CASE('B', bool, boolValue) @@ -212,17 +212,17 @@ return; } } - (void)setValue: (id)value - forUndefinedKey: (OFString*)key + forUndefinedKey: (OFString *)key { @throw [OFUndefinedKeyException exceptionWithObject: self key: key value: value]; } -- (void)setNilValueForKey: (OFString*)key +- (void)setNilValueForKey: (OFString *)key { @throw [OFInvalidArgumentException exception]; } @end