From 2918e1d62bdbea01b6a877f1a3318a13a5ca3e42 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Thu, 8 Apr 2021 15:56:40 +0200 Subject: Fixed bug in cpque_X_emplace_n(). --- stc/cpque.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/stc/cpque.h b/stc/cpque.h index 28e8113f..30197bd2 100644 --- a/stc/cpque.h +++ b/stc/cpque.h @@ -80,7 +80,7 @@ STC_API void CX##_push(CX* self, CX##_value_t value); \ STC_INLINE void CX##_emplace(CX* self, CX##_rawvalue_t raw) \ {CX##_push(self, ctype##_value_fromraw(raw));} \ - STC_API void CX##_emplace_n(CX *self, const CX##_rawvalue_t arr[], size_t size); \ + STC_API void CX##_emplace_n(CX *self, const CX##_rawvalue_t arr[], size_t n); \ \ _c_implement_cpque(CX, ctype, valueCompare) @@ -129,9 +129,11 @@ arr[c] = arr[c >> 1]; \ if (c != n) arr[c] = value; \ } \ +\ STC_API void \ - CX##_emplace_n(CX *self, const CX##_rawvalue_t arr[], size_t size) { \ - for (size_t i=0; i