Index: src/OFArray.h ================================================================== --- src/OFArray.h +++ src/OFArray.h @@ -100,18 +100,10 @@ @interface OFBigArray: OFArray { size_t size; } -/** - * Creates a new OFBigArray whose items all have the same size. - * - * \param is The size of each element in the OFBigArray - * \return A new allocated and initialized OFBigArray - */ -+ newWithItemSize: (size_t)is; - /** * Initializes an already allocated OFBigArray whose items all have the same * size. * * \param is The size of each element in the OFBigArray Index: src/OFArray.m ================================================================== --- src/OFArray.m +++ src/OFArray.m @@ -22,11 +22,11 @@ static size_t lastpagebyte = 0; @implementation OFArray + newWithItemSize: (size_t)is { - return [[OFArray alloc] initWithItemSize: is]; + return [[self alloc] initWithItemSize: is]; } - initWithItemSize: (size_t)is { if ((self = [super init])) { @@ -110,15 +110,10 @@ return self; } @end @implementation OFBigArray -+ newWithItemSize: (size_t)is -{ - return [[OFBigArray alloc] initWithItemSize: is]; -} - - initWithItemSize: (size_t)is { if (lastpagebyte == 0) lastpagebyte = getpagesize() - 1; Index: src/OFExceptions.m ================================================================== --- src/OFExceptions.m +++ src/OFExceptions.m @@ -29,11 +29,11 @@ #endif @implementation OFException + newWithObject: (id)obj { - return [[OFException alloc] initWithObject: obj]; + return [[self alloc] initWithObject: obj]; } - initWithObject: (id)obj { if ((self = [super init])) { @@ -60,12 +60,12 @@ @implementation OFNoMemException + newWithObject: (id)obj andSize: (size_t)size { - return [[OFNoMemException alloc] initWithObject: obj - andSize: size]; + return [[self alloc] initWithObject: obj + andSize: size]; } - initWithObject: (id)obj andSize: (size_t)size { @@ -94,12 +94,12 @@ @implementation OFMemNotPartOfObjException + newWithObject: (id)obj andPointer: (void*)ptr { - return [[OFMemNotPartOfObjException alloc] initWithObject: obj - andPointer: ptr]; + return [[self alloc] initWithObject: obj + andPointer: ptr]; } - initWithObject: (id)obj andPointer: (void*)ptr { @@ -131,11 +131,11 @@ @end @implementation OFOutOfRangeException + newWithObject: (id)obj { - return [[OFOutOfRangeException alloc] initWithObject: obj]; + return [[self alloc] initWithObject: obj]; } - initWithObject: (id)obj { return (self = [super initWithObject: obj]); @@ -156,13 +156,13 @@ @implementation OFOpenFileFailedException + newWithObject: (id)obj andPath: (const char*)p andMode: (const char*)m { - return [[OFOpenFileFailedException alloc] initWithObject: obj - andPath: p - andMode: m]; + return [[self alloc] initWithObject: obj + andPath: p + andMode: m]; } - initWithObject: (id)obj andPath: (const char*)p andMode: (const char*)m @@ -210,13 +210,13 @@ @implementation OFReadOrWriteFailedException + newWithObject: (id)obj andSize: (size_t)size andNItems: (size_t)nitems { - return [[OFReadOrWriteFailedException alloc] initWithObject: obj - andSize: size - andNItems: nitems]; + return [[self alloc] initWithObject: obj + andSize: size + andNItems: nitems]; } - initWithObject: (id)obj andSize: (size_t)size andNItems: (size_t)nitems Index: src/OFFile.m ================================================================== --- src/OFFile.m +++ src/OFFile.m @@ -23,11 +23,11 @@ @implementation OFFile + newWithPath: (const char*)path andMode: (const char*)mode { - return [[OFFile alloc] initWithPath: path + return [[self alloc] initWithPath: path andMode: mode]; } + (BOOL)changeModeOfFile: (const char*)path toMode: (mode_t)mode Index: src/OFListObject.m ================================================================== --- src/OFListObject.m +++ src/OFListObject.m @@ -16,11 +16,11 @@ #import "OFListObject.h" @implementation OFListObject + newWithData: (void*)ptr { - return [[OFListObject alloc] initWithData: ptr]; + return [[self alloc] initWithData: ptr]; } - initWithData: (void*)ptr { if ((self = [super init])) { Index: src/OFString.m ================================================================== --- src/OFString.m +++ src/OFString.m @@ -20,21 +20,21 @@ #import "OFExceptions.h" @implementation OFString + new { - return [[OFString alloc] init]; + return [[self alloc] init]; } + newFromCString: (const char*)str { - return [[OFString alloc] initFromCString: str]; + return [[self alloc] initFromCString: str]; } + newFromWideCString: (const wchar_t*)str { - return [[OFString alloc] initFromWideCString: str]; + return [[self alloc] initFromWideCString: str]; } - init { if ((self = [super init])) {