Differences From Artifact [4037992100]:
- File
src/OFMutableSet.m
— part of check-in
[627511b032]
at
2020-11-14 12:23:55
on branch trunk
— Rename of_malloc and of_calloc
The new names should be more accurate. (user: js, size: 3961) [annotate] [blame] [check-ins using] [more...]
To Artifact [880e8c01b7]:
- File src/OFMutableSet.m — part of check-in [1b82d3bf4f] at 2021-03-07 20:25:21 on branch trunk — *.m: Fold methods into one line where it fits (user: js, size: 3855) [annotate] [blame] [check-ins using] [more...]
1 | /* | < < | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2008-2021 Jonathan Schleifer <js@nil.im> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in * the packaging of this file. * |
︙ | ︙ | |||
56 57 58 59 60 61 62 | ret = [[OFMutableMapTableSet alloc] initWithObject: firstObject arguments: arguments]; va_end(arguments); return ret; } | | < | < | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | ret = [[OFMutableMapTableSet alloc] initWithObject: firstObject arguments: arguments]; va_end(arguments); return ret; } - (instancetype)initWithObjects: (id const *)objects count: (size_t)count { return (id)[[OFMutableMapTableSet alloc] initWithObjects: objects count: count]; } - (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments { return (id)[[OFMutableMapTableSet alloc] initWithObject: firstObject arguments: arguments]; } - (instancetype)initWithSerialization: (OFXMLElement *)element { |
︙ | ︙ | |||
180 181 182 183 184 185 186 | for (id object in self) { assert(i < count); cArray[i++] = object; } for (i = 0; i < count; i++) if (![set containsObject: cArray[i]]) | | | 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | for (id object in self) { assert(i < count); cArray[i++] = object; } for (i = 0; i < count; i++) if (![set containsObject: cArray[i]]) [self removeObject: cArray[i]]; } @finally { free(cArray); } objc_autoreleasePoolPop(pool); } |
︙ | ︙ |