Error in reset_ctrl ?
未關閉
- 主要語言
- C++
- 星號
- 18.1k
- 分支
- 3.2k
- 平均合併
- 20 小時 36 分鐘
- 30 天內合併 PR
- 1
描述
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;
貢獻指南
評估
這個 Issue 還沒有評估資料。