abseil / abseil/abseil-cpp

Error in reset_ctrl ?

Abierto
#334 4 comentarios 0 reacciones 1 asignado Reclamado por @fowles Ver en GitHub
Lenguaje dominante
C++
Estrellas
18.1k
Forks
3.2k
Merge medio
20 h 36 min
PR fusionados (30 d)
1

Descripción

https://github.com/abseil/abseil-cpp/blob/43ef2148c0936ebf7cb4be6b19927a9d9d145b8f/absl/container/internal/raw_hash_set.h#L1717

The length of ctrl_ is capacity + width + 1, and your comment says set it all to empty, except the last element, to sentinel.
You are setting it all to empty, except the last element, but instead of setting the last element to sentinel, you are ignoring width.
So:
ctrl_[capacity_] = kSentinel;
==>
ctrl_[capacity_ + Group::kWidth] = kSentinel;

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.