From d557e3e35f17af77e2c7f7ad233f37703104acc7 Mon Sep 17 00:00:00 2001 From: Lofty Date: Thu, 4 Jan 2024 16:08:15 +0000 Subject: [PATCH] hashlib: constify const_iterators --- common/kernel/hashlib.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common/kernel/hashlib.h b/common/kernel/hashlib.h index 884fcdcc..8ddfa0f8 100644 --- a/common/kernel/hashlib.h +++ b/common/kernel/hashlib.h @@ -380,8 +380,8 @@ template class dict using iterator_category = std::forward_iterator_tag; using value_type = std::pair; using difference_type = std::ptrdiff_t; - using pointer = std::pair*; - using reference = std::pair&; + using pointer = const std::pair*; + using reference = const std::pair&; const_iterator() {} const_iterator operator++() { @@ -831,8 +831,8 @@ template class pool using iterator_category = std::forward_iterator_tag; using value_type = K; using difference_type = std::ptrdiff_t; - using pointer = K*; - using reference = K&; + using pointer = const K*; + using reference = const K&; const_iterator() {} const_iterator operator++() { @@ -1068,8 +1068,8 @@ template class idict using iterator_category = std::forward_iterator_tag; using value_type = K; using difference_type = std::ptrdiff_t; - using pointer = K*; - using reference = K&; + using pointer = const K*; + using reference = const K&; const_iterator() {} const_iterator operator++() {