# hash_map.zig: Pass \`self\` by value and less pointer-int conversion · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/c0da92f71476651ac654249d54512e514b55df55)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: c0da92f71476651ac654249d54512e514b55df55

Requested commit: c0da92f71476651ac654249d54512e514b55df55

Commit: c0da92f71476651ac654249d54512e514b55df55

Tree: 6e97c4981735facf5d044fb148ceaa91c6d3b79c

Author: Sean

Committer: Veikka Tuominen

## Message

```
hash_map.zig: Pass `self` by value and less pointer-int conversion

 - Used `Self` instead of `*const Self` where appropriate (orignally proposed in #19770)
 - Replaced `@intFromPtr` and `@ptrFromInt` with `@ptrCast`, `@alignCast`, and pointer arithmetic where appropriate

With this, the only remaining instance on pointer-int conversion in hash_map.zig is in `HashMapUnmanaged.removeByPtr`, which easily be able to be eliminated once pointer subtraction is supported.
```

## Parents

- [389181f6be8810b5cd432e236a962229257a5b59](https://git.cafe/gitcafe/zig/commit/389181f6be8810b5cd432e236a962229257a5b59?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/c0da92f71476651ac654249d54512e514b55df55?format=markdown)
