fix const-ness of non-mutating iterator creation for maps

Sun, 21 May 2023 16:22:09 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 21 May 2023 16:22:09 +0200
changeset 710
2dd409ed056f
parent 709
1e8ba59e7911
child 711
71b2f3f63182

fix const-ness of non-mutating iterator creation for maps

src/cx/map.h file | annotate | diff | comparison | revisions
     1.1 --- a/src/cx/map.h	Sun May 21 15:07:31 2023 +0200
     1.2 +++ b/src/cx/map.h	Sun May 21 16:22:09 2023 +0200
     1.3 @@ -215,7 +215,7 @@
     1.4   * @return an iterator for the currently stored values
     1.5   */
     1.6  __attribute__((__nonnull__, __warn_unused_result__))
     1.7 -static inline CxIterator cxMapIteratorValues(CxMap *map) {
     1.8 +static inline CxIterator cxMapIteratorValues(CxMap const *map) {
     1.9      return map->cl->iterator(map, CX_MAP_ITERATOR_VALUES);
    1.10  }
    1.11  
    1.12 @@ -231,7 +231,7 @@
    1.13   * @return an iterator for the currently stored keys
    1.14   */
    1.15  __attribute__((__nonnull__, __warn_unused_result__))
    1.16 -static inline CxIterator cxMapIteratorKeys(CxMap *map) {
    1.17 +static inline CxIterator cxMapIteratorKeys(CxMap const *map) {
    1.18      return map->cl->iterator(map, CX_MAP_ITERATOR_KEYS);
    1.19  }
    1.20  
    1.21 @@ -249,7 +249,7 @@
    1.22   * @see cxMapIteratorValues()
    1.23   */
    1.24  __attribute__((__nonnull__, __warn_unused_result__))
    1.25 -static inline CxIterator cxMapIterator(CxMap *map) {
    1.26 +static inline CxIterator cxMapIterator(CxMap const *map) {
    1.27      return map->cl->iterator(map, CX_MAP_ITERATOR_PAIRS);
    1.28  }
    1.29  

mercurial