Differences From Artifact [2e4450a75d]:
- File src/OFMutableData.m — part of check-in [7e5c81e186] at 2018-01-03 19:49:46 on branch trunk — Update copyright notice (user: js, size: 6195) [annotate] [blame] [check-ins using]
To Artifact [419f5baa46]:
- File
src/OFMutableData.m
— part of check-in
[dae363ef82]
at
2018-02-16 22:25:08
on branch trunk
— Remove OF_UNAVAILABLE from two -[init] methods
These were unavailable in the immutable class, but available in the
mutable subclass. However, Clang 3.4 does not support this. (user: js, size: 6159) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
18 19 20 21 22 23 24 | #include "config.h" #include <stdlib.h> #include <string.h> #include <limits.h> #import "OFMutableData.h" | < | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #include <stdlib.h> #include <string.h> #include <limits.h> #import "OFMutableData.h" #import "OFString.h" #import "OFInvalidArgumentException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" @implementation OFMutableData |
︙ | ︙ | |||
50 51 52 53 54 55 56 | { return [[[self alloc] initWithItemSize: itemSize capacity: capacity] autorelease]; } - (instancetype)init { | | | | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | { return [[[self alloc] initWithItemSize: itemSize capacity: capacity] autorelease]; } - (instancetype)init { self = [super init]; _itemSize = 1; return self; } - (instancetype)initWithItemSize: (size_t)itemSize { self = [super init]; @try { if (itemSize == 0) @throw [OFInvalidArgumentException exception]; _itemSize = itemSize; } @catch (id e) { |
︙ | ︙ | |||
83 84 85 86 87 88 89 | return [self initWithItemSize: 1 capacity: capacity]; } - (instancetype)initWithItemSize: (size_t)itemSize capacity: (size_t)capacity { | | | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | return [self initWithItemSize: 1 capacity: capacity]; } - (instancetype)initWithItemSize: (size_t)itemSize capacity: (size_t)capacity { self = [super init]; @try { if (itemSize == 0) @throw [OFInvalidArgumentException exception]; _items = [self allocMemoryWithSize: itemSize count: capacity]; |
︙ | ︙ |