From 4a51581429e93ef2194228eab33536081079d977 Mon Sep 17 00:00:00 2001 From: rakshasa Date: Thu, 19 Dec 2024 16:06:22 +0000 Subject: [PATCH] Use std::array in partial_queue. --- rak/partial_queue.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rak/partial_queue.h b/rak/partial_queue.h index 1abfdddf2..07e672711 100644 --- a/rak/partial_queue.h +++ b/rak/partial_queue.h @@ -37,6 +37,7 @@ #ifndef RAK_PARTIAL_QUEUE_H #define RAK_PARTIAL_QUEUE_H +#include #include #include #include @@ -107,7 +108,7 @@ class partial_queue { size_type m_index; size_type m_ceiling; - size_pair_type m_layers[num_layers]; + std::array m_layers; }; inline void @@ -137,7 +138,7 @@ partial_queue::clear() { m_index = 0; m_ceiling = ceiling(num_layers - 1); - std::memset(m_layers, 0, num_layers * sizeof(size_pair_type)); + m_layers = {}; } inline bool