@@ -84,11 +84,11 @@ return (t)value.float_; \ case OF_NUMBER_DOUBLE: \ return (t)value.double_; \ default: \ @throw [OFInvalidFormatException \ - exceptionWithClass: isa]; \ + exceptionWithClass: [self class]]; \ } #define CALCULATE(o, n) \ switch (type) { \ case OF_NUMBER_BOOL: \ return [OFNumber numberWithBool: \ @@ -168,11 +168,11 @@ case OF_NUMBER_DOUBLE: \ return [OFNumber numberWithDouble: \ value.double_ o [n doubleValue]]; \ default: \ @throw [OFInvalidFormatException \ - exceptionWithClass: isa]; \ + exceptionWithClass: [self class]]; \ } #define CALCULATE2(o, n) \ switch (type) { \ case OF_NUMBER_BOOL: \ return [OFNumber numberWithBool: \ @@ -247,15 +247,15 @@ return [OFNumber numberWithUIntPtr: \ value.uintptr o [n uIntPtrValue]]; \ case OF_NUMBER_FLOAT: \ case OF_NUMBER_DOUBLE: \ @throw [OFNotImplementedException \ - exceptionWithClass: isa \ + exceptionWithClass: [self class] \ selector: _cmd]; \ default: \ @throw [OFInvalidFormatException \ - exceptionWithClass: isa]; \ + exceptionWithClass: [self class]]; \ } #define CALCULATE3(o) \ switch (type) { \ case OF_NUMBER_BOOL: \ return [OFNumber numberWithBool: value.bool_ o]; \ @@ -312,11 +312,11 @@ return [OFNumber numberWithFloat: value.float_ o]; \ case OF_NUMBER_DOUBLE: \ return [OFNumber numberWithDouble: value.double_ o]; \ default: \ @throw [OFInvalidFormatException \ - exceptionWithClass: isa]; \ + exceptionWithClass: [self class]]; \ } @implementation OFNumber + numberWithBool: (BOOL)bool_ { @@ -448,11 +448,11 @@ return [[[self alloc] initWithDouble: double_] autorelease]; } - init { - @throw [OFNotImplementedException exceptionWithClass: isa + @throw [OFNotImplementedException exceptionWithClass: [self class] selector: _cmd]; } - initWithBool: (BOOL)bool_ { @@ -723,11 +723,11 @@ OFString *typeString; if (![[element name] isEqual: [self className]] || ![[element namespace] isEqual: OF_SERIALIZATION_NS]) @throw [OFInvalidArgumentException - exceptionWithClass: isa + exceptionWithClass: [self class] selector: _cmd]; typeString = [[element attributeForName: @"type"] stringValue]; if ([typeString isEqual: @"boolean"]) { @@ -737,11 +737,11 @@ value.bool_ = YES; else if ([[element stringValue] isEqual: @"NO"]) value.bool_ = NO; else @throw [OFInvalidArgumentException - exceptionWithClass: isa + exceptionWithClass: [self class] selector: _cmd]; } else if ([typeString isEqual: @"unsigned"]) { /* * FIXME: This will fail if the value is bigger than * INTMAX_MAX! @@ -757,11 +757,11 @@ } else if ([typeString isEqual: @"double"]) { type = OF_NUMBER_DOUBLE; value.double_ = [element doubleValue]; } else @throw [OFInvalidArgumentException - exceptionWithClass: isa + exceptionWithClass: [self class] selector: _cmd]; [pool release]; } @catch (id e) { [self release]; @@ -1127,11 +1127,12 @@ numberWithFloat: fmodf(value.float_, [number floatValue])]; case OF_NUMBER_DOUBLE: return [OFNumber numberWithDouble: fmod(value.double_, [number doubleValue])]; default: - @throw [OFInvalidFormatException exceptionWithClass: isa]; + @throw [OFInvalidFormatException + exceptionWithClass: [self class]]; } } - copy { @@ -1187,11 +1188,12 @@ [ret makeImmutable]; return ret; default: - @throw [OFInvalidFormatException exceptionWithClass: isa]; + @throw [OFInvalidFormatException + exceptionWithClass: [self class]]; } } - (OFXMLElement*)XMLElementBySerializing { @@ -1249,11 +1251,12 @@ [element setStringValue: [OFString stringWithFormat: @"%la", value.double_]]; break; default: - @throw [OFInvalidFormatException exceptionWithClass: isa]; + @throw [OFInvalidFormatException + exceptionWithClass: [self class]]; } [element retain]; [pool release]; [element autorelease];