Differences From Artifact [6c880cfe21]:
- File
src/exceptions/OFHashAlreadyCalculatedException.m
— part of check-in
[d9ddc4d06e]
at
2013-02-13 23:10:35
on branch trunk
— Don't cache the description of exceptions.
This was pretty pointless, as it's usually only used once. (user: js, size: 1523) [annotate] [blame] [check-ins using]
To Artifact [c96d938c3c]:
- File src/exceptions/OFHashAlreadyCalculatedException.m — part of check-in [9b2d255a3d] at 2013-02-18 23:05:20 on branch trunk — Make OFHash a protocol. (user: js, size: 1516) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
16 17 18 19 20 21 22 | #include "config.h" #include <stdlib.h> #import "OFHashAlreadyCalculatedException.h" #import "OFString.h" | < | | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | #include "config.h" #include <stdlib.h> #import "OFHashAlreadyCalculatedException.h" #import "OFString.h" #import "common.h" @implementation OFHashAlreadyCalculatedException + (instancetype)exceptionWithClass: (Class)class hash: (id <OFHash>)hash { return [[[self alloc] initWithClass: class hash: hash] autorelease]; } - initWithClass: (Class)class { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @throw e; } abort(); } - initWithClass: (Class)class hash: (id <OFHash>)hashObject { self = [super initWithClass: class]; _hashObject = [hashObject retain]; return self; } |
︙ | ︙ | |||
64 65 66 67 68 69 70 | - (OFString*)description { return [OFString stringWithFormat: @"The hash has already been calculated in class %@ and thus no new " @"data can be added", _inClass]; } | | | 63 64 65 66 67 68 69 70 71 72 73 74 | - (OFString*)description { return [OFString stringWithFormat: @"The hash has already been calculated in class %@ and thus no new " @"data can be added", _inClass]; } - (id <OFHash>)hashObject { OF_GETTER(_hashObject, NO) } @end |