@@ -14,16 +14,13 @@ * file. */ #include "config.h" -#define OF_MUTABLE_SET_HASHTABLE_M - #import "OFSet_hashtable.h" #import "OFMutableSet_hashtable.h" -#import "OFMutableDictionary_hashtable.h" -#import "OFNumber.h" +#import "OFMapTable.h" @implementation OFMutableSet_hashtable + (void)initialize { if (self == [OFMutableSet_hashtable class]) @@ -30,20 +27,19 @@ [self inheritMethodsFromClass: [OFSet_hashtable class]]; } - (void)addObject: (id)object { - [dictionary OF_setObject: [OFNumber numberWithSize: 1] - forKey: object - copyKey: NO]; + [mapTable setValue: (void*)1 + forKey: object]; } - (void)removeObject: (id)object { - [dictionary removeObjectForKey: object]; + [mapTable removeValueForKey: object]; } - (void)makeImmutable { object_setClass(self, [OFSet_hashtable class]); } @end