abseil / abseil/abseil-cpp

Error in reset_ctrl ?

オープン
#334 コメント 4 件 リアクション 0 件 担当者 1 名 @fowles が担当を希望しています GitHub で見る
主要言語
C++
スター
18.1k
フォーク
3.2k
平均マージ
20時間 36分
マージ済み PR(30日)
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 はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。