diff options
| author | Tyge Løvset <[email protected]> | 2021-02-20 16:57:09 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-02-20 16:57:09 +0100 |
| commit | 4d9378ef420b4787208a742057a60dcf408ef741 (patch) | |
| tree | bb6b2a425308c5f1ae8bcb330c9e77114c555480 /benchmarks/cmap_benchmark3.cpp | |
| parent | b24dd76490733666f7f7b3147c5c64a75c973ac6 (diff) | |
| download | STC-modified-4d9378ef420b4787208a742057a60dcf408ef741.tar.gz STC-modified-4d9378ef420b4787208a742057a60dcf408ef741.zip | |
Internal renaming improvements.
Diffstat (limited to 'benchmarks/cmap_benchmark3.cpp')
| -rw-r--r-- | benchmarks/cmap_benchmark3.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/benchmarks/cmap_benchmark3.cpp b/benchmarks/cmap_benchmark3.cpp index 2990619e..fa7edabd 100644 --- a/benchmarks/cmap_benchmark3.cpp +++ b/benchmarks/cmap_benchmark3.cpp @@ -47,8 +47,8 @@ stc64_t rng; #define CMAP_DTOR(X) cmap_##X##_del(&map)
#define KMAP_SETUP(X, Key, Value) khash_t(ii)* map = kh_init(ii); khiter_t ki; int ret
-#define KMAP_PUT(X, key, val) (*(ki = kh_emplace_put(ii, map, key, &ret), map->vals[ki] = val, &map->vals[ki]))
-#define KMAP_EMPLACE(X, key, val) (ki = kh_emplace_put(ii, map, key, &ret), ret ? (map->vals[ki] = val, 0) : 0, map->vals[ki])
+#define KMAP_PUT(X, key, val) (*(ki = kh_put(ii, map, key, &ret), map->vals[ki] = val, &map->vals[ki]))
+#define KMAP_EMPLACE(X, key, val) (ki = kh_put(ii, map, key, &ret), ret ? (map->vals[ki] = val, 0) : 0, map->vals[ki])
#define KMAP_ERASE(X, key) ((ki = kh_get(ii, map, key)) != kh_end(map) ? kh_del(ii, map, ki), 1 : 0)
#define KMAP_FIND(X, key) (kh_get(ii, map, key) != kh_end(map))
#define KMAP_SIZE(X) kh_size(map)
|
