Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ auto HPackTable::MementoRingBuffer::PopOne() -> Memento {
return std::move(entries_[index]);
}

auto HPackTable::MementoRingBuffer::Lookup(uint32_t index) const -> const Memento* {
auto HPackTable::MementoRingBuffer::Lookup(uint32_t index) const
-> const Memento* {
if (index >= num_entries_) return nullptr;
uint32_t offset = (num_entries_ - 1u - index + first_entry_) % max_entries_;
return &entries_[offset];
Expand Down
4 changes: 2 additions & 2 deletions src/core/ext/transport/chttp2/transport/hpack_parser_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ class HPackTable {
uint32_t first_entry_ = 0;
// How many entries are in the table.
uint32_t num_entries_ = 0;
// Maximum number of entries we could possibly fit in the table, given defined
// overheads.
// Maximum number of entries we could possibly fit in the table, given
// defined overheads.
uint32_t max_entries_ = hpack_constants::kInitialTableEntries;

std::vector<Memento> entries_;
Expand Down