Differences From Artifact [c087e53711]:
- File
src/OFMapTableSet.m
— part of check-in
[6ce0093f8d]
at
2023-04-10 19:22:32
on branch trunk
— Remove OFSerialization
While the idea sounds nice that the tag name is the class, this means the
serialization includes whether something is mutable or immutable. This means
doing as much as making something immutable changes the serialization, which
can then cause issues after being deserialized. (user: js, size: 5052) [annotate] [blame] [check-ins using] [more...]
To Artifact [86fb079ff7]:
- File src/OFConcreteSet.m — part of check-in [281b494de4] at 2023-08-09 10:09:08 on branch trunk — More consistency in naming of private classes (user: js, size: 5052) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
11 12 13 14 15 16 17 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" | | | | | | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #import "OFConcreteSet.h" #import "OFArray.h" #import "OFConcreteCountedSet.h" #import "OFConcreteMutableSet.h" #import "OFMapTable+Private.h" #import "OFMapTable.h" #import "OFString.h" #import "OFInvalidArgumentException.h" #import "OFEnumerationMutationException.h" static void * retain(void *object) |
︙ | ︙ | |||
54 55 56 57 58 59 60 | .retain = retain, .release = release, .hash = hash, .equal = equal }; static const OFMapTableFunctions objectFunctions = { NULL }; | | | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | .retain = retain, .release = release, .hash = hash, .equal = equal }; static const OFMapTableFunctions objectFunctions = { NULL }; @implementation OFConcreteSet - (instancetype)init { return [self initWithCapacity: 0]; } - (instancetype)initWithCapacity: (size_t)capacity { |
︙ | ︙ | |||
198 199 200 201 202 203 204 | return false; return ([_mapTable objectForKey: object] != nil); } - (bool)isEqual: (id)object { | | | | | | 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | return false; return ([_mapTable objectForKey: object] != nil); } - (bool)isEqual: (id)object { OFConcreteSet *set; if (object == self) return true; if (![object isKindOfClass: [OFConcreteSet class]] && ![object isKindOfClass: [OFConcreteMutableSet class]] && ![object isKindOfClass: [OFConcreteCountedSet class]]) return [super isEqual: object]; set = object; return [set->_mapTable isEqual: _mapTable]; } |
︙ | ︙ |