diff options
| author | Tyge Løvset <[email protected]> | 2023-01-06 11:40:41 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-01-06 11:40:41 +0100 |
| commit | 7abea5ab04bffebbedfad7bd8d9c5c26170d19af (patch) | |
| tree | 25f1aa511aa27198c31b7bad13ae137dd52828ad /include/stc/cmap.h | |
| parent | dd1ac09cd54e2632ec9d272ec578cde67a5edd01 (diff) | |
| download | STC-modified-7abea5ab04bffebbedfad7bd8d9c5c26170d19af.tar.gz STC-modified-7abea5ab04bffebbedfad7bd8d9c5c26170d19af.zip | |
Removed swap() function from all containers. Use safe c_SWAP() macro instead.
Diffstat (limited to 'include/stc/cmap.h')
| -rw-r--r-- | include/stc/cmap.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/stc/cmap.h b/include/stc/cmap.h index 20375051..df3ce6fc 100644 --- a/include/stc/cmap.h +++ b/include/stc/cmap.h @@ -115,7 +115,6 @@ STC_INLINE size_t _cx_memb(_size)(const _cx_self* map) { return map->size; STC_INLINE size_t _cx_memb(_bucket_count)(_cx_self* map) { return map->bucket_count; } STC_INLINE size_t _cx_memb(_capacity)(const _cx_self* map) { return (size_t)((float)map->bucket_count * (i_max_load_factor)); } -STC_INLINE void _cx_memb(_swap)(_cx_self *map1, _cx_self *map2) {c_SWAP(_cx_self, *map1, *map2); } STC_INLINE bool _cx_memb(_contains)(const _cx_self* self, _cx_rawkey rkey) { return self->size && self->_hashx[_cx_memb(_bucket_)(self, &rkey).idx]; } @@ -416,7 +415,7 @@ _cx_memb(_reserve)(_cx_self* self, const size_t _newcap) { m.table[b.idx] = *e; m._hashx[b.idx] = (uint8_t)b.hx; } - c_SWAP(_cx_self, *self, m); + c_SWAP(_cx_self, self, &m); } c_FREE(m._hashx); c_FREE(m.table); |
