@@ -134,46 +134,46 @@ andArguments: args] autorelease]; } - init { - if ((self = [super init])) { - length = 0; - string = NULL; - is_utf8 = NO; - } + [super init]; + + length = 0; + string = NULL; + is_utf8 = NO; return self; } - initWithCString: (const char*)str { Class c; - if ((self = [super init])) { - if (str != NULL) { - length = strlen(str); + self = [super init]; - switch (check_utf8(str, length)) { + if (str != NULL) { + length = strlen(str); + + switch (check_utf8(str, length)) { case 1: is_utf8 = YES; break; case -1: c = isa; [super free]; @throw [OFInvalidEncodingException - newWithClass: c]; - } - - @try { - string = [self getMemWithSize: length + 1]; - } @catch (OFException *e) { - [self free]; - @throw e; - } - memcpy(string, str, length + 1); - } + newWithClass: c]; + } + + @try { + string = [self getMemWithSize: length + 1]; + } @catch (OFException *e) { + [self free]; + @throw e; + } + memcpy(string, str, length + 1); } return self; } @@ -194,42 +194,41 @@ andArguments: (va_list)args { int t; Class c; - if ((self = [super init])) { - if (fmt == NULL) { - c = isa; - [super free]; - @throw [OFInvalidFormatException newWithClass: c]; - } - - if ((t = vasprintf(&string, fmt, args)) == -1) { - c = isa; - [super free]; - @throw [OFInitializationFailedException - newWithClass: c]; - } - length = t; - - switch (check_utf8(string, length)) { + self = [super init]; + + if (fmt == NULL) { + c = isa; + [super free]; + @throw [OFInvalidFormatException newWithClass: c]; + } + + if ((t = vasprintf(&string, fmt, args)) == -1) { + c = isa; + [super free]; + @throw [OFInitializationFailedException newWithClass: c]; + } + length = t; + + switch (check_utf8(string, length)) { case 1: is_utf8 = YES; break; case -1: free(string); c = isa; [super free]; @throw [OFInvalidEncodingException newWithClass: c]; - } - - @try { - [self addToMemoryPool: string]; - } @catch (OFException *e) { - free(string); - @throw e; - } + } + + @try { + [self addToMemoryPool: string]; + } @catch (OFException *e) { + free(string); + @throw e; } return self; }