Overview
| Comment: | Clean up a few -[hash] methods. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
10f221ad303086acf45d93a0c2b54988 |
| User & Date: | js on 2012-12-06 00:51:09 |
| Other Links: | manifest | tags |
Context
|
2012-12-06
| ||
| 01:08 | runtime.h: Remove functions which are elsewhere. (check-in: 5c5ae52ccd user: js tags: trunk) | |
| 00:51 | Clean up a few -[hash] methods. (check-in: 10f221ad30 user: js tags: trunk) | |
| 00:14 | Improve -[hash] of OFNumber and OFObject. (check-in: ac51f5f0cf user: js tags: trunk) | |
Changes
Modified src/OFArray.m from [4f7e60625c] to [a77077bbb2].
| ︙ | ︙ | |||
450 451 452 453 454 455 456 |
{
id *objects = [self objects];
size_t i, count = [self count];
uint32_t hash;
OF_HASH_INIT(hash);
| | | < < < < < < | 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 |
{
id *objects = [self objects];
size_t i, count = [self count];
uint32_t hash;
OF_HASH_INIT(hash);
for (i = 0; i < count; i++)
OF_HASH_ADD_HASH(hash, [objects[i] hash]);
OF_HASH_FINALIZE(hash);
return hash;
}
- (OFString*)description
|
| ︙ | ︙ |
Modified src/OFArray_adjacent.m from [7116965323] to [78c03c8d5c].
| ︙ | ︙ | |||
321 322 323 324 325 326 327 |
{
id *objects = [array cArray];
size_t i, count = [array count];
uint32_t hash;
OF_HASH_INIT(hash);
| | | < < < < < < | 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 |
{
id *objects = [array cArray];
size_t i, count = [array count];
uint32_t hash;
OF_HASH_INIT(hash);
for (i = 0; i < count; i++)
OF_HASH_ADD_HASH(hash, [objects[i] hash]);
OF_HASH_FINALIZE(hash);
return hash;
}
#ifdef OF_HAVE_BLOCKS
|
| ︙ | ︙ |
Modified src/OFDataArray.m from [dfe3b68b31] to [0d3563afe7].
| ︙ | ︙ | |||
483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 |
- (uint32_t)hash
{
uint32_t hash;
size_t i;
OF_HASH_INIT(hash);
for (i = 0; i < count * itemSize; i++)
OF_HASH_ADD(hash, ((char*)data)[i]);
OF_HASH_FINALIZE(hash);
return hash;
}
- (OFString*)description
{
| > > | 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 |
- (uint32_t)hash
{
uint32_t hash;
size_t i;
OF_HASH_INIT(hash);
for (i = 0; i < count * itemSize; i++)
OF_HASH_ADD(hash, ((char*)data)[i]);
OF_HASH_FINALIZE(hash);
return hash;
}
- (OFString*)description
{
|
| ︙ | ︙ |
Modified src/OFList.m from [ccac864af8] to [872a6d7ce4].
| ︙ | ︙ | |||
323 324 325 326 327 328 329 |
- (uint32_t)hash
{
of_list_object_t *iter;
uint32_t hash;
OF_HASH_INIT(hash);
| | | < < < < < < | 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
- (uint32_t)hash
{
of_list_object_t *iter;
uint32_t hash;
OF_HASH_INIT(hash);
for (iter = firstListObject; iter != NULL; iter = iter->next)
OF_HASH_ADD_HASH(hash, [iter->object hash]);
OF_HASH_FINALIZE(hash);
return hash;
}
- (OFString*)description
|
| ︙ | ︙ |