Hashes the id and properties of the edge. */
| 667 | |
| 668 | /* Hashes the id and properties of the edge. */ |
| 669 | XXH64_hash_t SIEdge_HashCode(const SIValue v) { |
| 670 | XXH_errorcode res; |
| 671 | XXH64_state_t state; |
| 672 | res = XXH64_reset(&state, 0); |
| 673 | UNUSED(res); |
| 674 | ASSERT(res != XXH_ERROR); |
| 675 | |
| 676 | Edge *e = (Edge *)v.ptrval; |
| 677 | int id = ENTITY_GET_ID(e); |
| 678 | SIType t = SI_TYPE(v); |
| 679 | XXH64_update(&state, &(t), sizeof(t)); |
| 680 | XXH64_update(&state, &id, sizeof(id)); |
| 681 | |
| 682 | XXH64_hash_t hashCode = XXH64_digest(&state); |
| 683 | return hashCode; |
| 684 | } |
| 685 | |
| 686 | void SIValue_HashUpdate(SIValue v, XXH64_state_t *state) { |
| 687 | // handles null value and defaults |
no outgoing calls
no test coverage detected