diff options
| author | Tyge Løvset <[email protected]> | 2020-09-07 16:43:32 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2020-09-07 16:43:32 +0200 |
| commit | 708f45220329f4e23b1671cb1b18c37f98232bff (patch) | |
| tree | 8049c807c2c3b86e1827c6596c4561413609e858 | |
| parent | eb222490cc650bf2382f32021b820ee30ef98c5a (diff) | |
| download | STC-modified-708f45220329f4e23b1671cb1b18c37f98232bff.tar.gz STC-modified-708f45220329f4e23b1671cb1b18c37f98232bff.zip | |
Forgot to convert priority_queue to use emplace() function name.
| -rw-r--r-- | stc/cpqueue.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stc/cpqueue.h b/stc/cpqueue.h index 4cdc3f37..ea8bd0ed 100644 --- a/stc/cpqueue.h +++ b/stc/cpqueue.h @@ -73,10 +73,10 @@ cpqueue_##X##_top(const cpqueue_##X* self) {return &self->data[0];} \ STC_INLINE void \
cpqueue_##X##_pop(cpqueue_##X* self) {cpqueue_##X##_erase(self, 0);} \
STC_API void \
-cpqueue_##X##_push_v(cpqueue_##X* self, cpqueue_##X##_value_t value); \
+cpqueue_##X##_push(cpqueue_##X* self, cpqueue_##X##_value_t value); \
STC_INLINE void \
-cpqueue_##X##_push(cpqueue_##X* self, cpqueue_##X##_rawvalue_t rawValue) { \
- cpqueue_##X##_push_v(self, ctype##_value_from_raw(rawValue)); \
+cpqueue_##X##_emplace(cpqueue_##X* self, cpqueue_##X##_rawvalue_t rawValue) { \
+ cpqueue_##X##_push(self, ctype##_value_from_raw(rawValue)); \
} \
STC_API void \
cpqueue_##X##_push_n(cpqueue_##X *self, const cpqueue_##X##_input_t in[], size_t size); \
@@ -119,7 +119,7 @@ cpqueue_##X##_erase(cpqueue_##X* self, size_t i) { \ } \
\
STC_API void \
-cpqueue_##X##_push_v(cpqueue_##X* self, cpqueue_##X##_value_t value) { \
+cpqueue_##X##_push(cpqueue_##X* self, cpqueue_##X##_value_t value) { \
ctype##_push_back(self, value); /* sift-up the value */ \
size_t n = cpqueue_##X##_size(*self), c = n; \
cpqueue_##X##_value_t *arr = self->data - 1; \
|
