ObjFW  Check-in [0977cd6fa6]

Overview
Comment:Remove useless == nil check - it can't be nil.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0977cd6fa6bf541da09efcbb9d00663e130de13ca8fddf9b5bd909d95c4c9bc1
User & Date: js on 2009-04-21 17:30:26
Other Links: manifest | tags
Context
2009-04-21
18:07
Remove useless + load from OFObject. check-in: ba65a43f3f user: js tags: trunk
17:30
Remove useless == nil check - it can't be nil. check-in: 0977cd6fa6 user: js tags: trunk
17:28
Add missing breaks in OFNumber. check-in: 06c07468fb user: js tags: trunk
Changes

Modified src/OFDictionary.m from [570b1e1aa5] to [c3ececb121].

87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
{
	uint32_t hash = [key hash] & (size - 1);
	of_list_object_t *iter;

	if (data[hash] == nil)
		data[hash] = [OFList new];

	if (data[hash] == nil)
		@throw [OFInitializationFailedException
		    newWithClass: [OFList class]];

	for (iter = [data[hash] first]; iter != NULL; iter = iter->next->next) {
		if ([iter->object isEqual: key]) {
			[iter->next->object release];
			[obj retain];
			iter->next->object = obj;

			return self;







<
<
<
<







87
88
89
90
91
92
93




94
95
96
97
98
99
100
{
	uint32_t hash = [key hash] & (size - 1);
	of_list_object_t *iter;

	if (data[hash] == nil)
		data[hash] = [OFList new];





	for (iter = [data[hash] first]; iter != NULL; iter = iter->next->next) {
		if ([iter->object isEqual: key]) {
			[iter->next->object release];
			[obj retain];
			iter->next->object = obj;

			return self;