Differences From Artifact [f70a5505ca]:
- File src/OFDataArray.m — part of check-in [42e16978dc] at 2009-07-19 16:01:21 on branch trunk — Prevent calling -[init] if parameters are required. (user: js, size: 5065) [annotate] [blame] [check-ins using]
To Artifact [c9dcd66730]:
- File src/OFDataArray.m — part of check-in [bc012259a9] at 2009-08-10 18:25:15 on branch trunk — Correctly handle lastObject / lastItem if the array is empty. (user: js, size: 5114) [annotate] [blame] [check-ins using]
︙ | |||
78 79 80 81 82 83 84 85 86 87 88 89 90 91 | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | + + + | @throw [OFOutOfRangeException newWithClass: isa]; return data + index * itemsize; } - (void*)lastItem { if (data == NULL || count == 0) return NULL; return data + (count - 1) * itemsize; } - addItem: (void*)item { if (SIZE_MAX - count < 1) @throw [OFOutOfRangeException newWithClass: isa]; |
︙ |