Differences From Artifact [b126234b89]:
- File src/OFMutableSet.m — part of check-in [1a86b8175b] at 2022-02-12 07:46:07 on branch trunk — Update copyright (user: js, size: 3868) [annotate] [blame] [check-ins using] [more...]
To Artifact [1675014936]:
- File
src/OFMutableSet.m
— part of check-in
[c86b8f10f0]
at
2022-11-16 01:27:26
on branch trunk
— Add OFAssert()
This uses the same format as OFEnsure(). (user: js, size: 3870) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
13 14 15 16 17 18 19 | * file. */ #include "config.h" #include <stdlib.h> | < < > | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | * file. */ #include "config.h" #include <stdlib.h> #import "OFMutableSet.h" #import "OFMutableMapTableSet.h" #import "OFString.h" static struct { Class isa; } placeholder; @interface OFMutableSetPlaceholder: OFMutableSet @end |
︙ | ︙ | |||
170 171 172 173 174 175 176 | cArray = OFAllocMemory(count, sizeof(id)); @try { size_t i; i = 0; for (id object in self) { | | | 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | cArray = OFAllocMemory(count, sizeof(id)); @try { size_t i; i = 0; for (id object in self) { OFAssert(i < count); cArray[i++] = object; } for (i = 0; i < count; i++) if (![set containsObject: cArray[i]]) [self removeObject: cArray[i]]; } @finally { |
︙ | ︙ |