Skip to content

Commit

Permalink
refactor: Optimize HeadersToAddEntry class layout (#37215)
Browse files Browse the repository at this point in the history
Signed-off-by: Yury Kats <[email protected]>
  • Loading branch information
yurykats authored Nov 18, 2024
1 parent b580053 commit e2cec22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/common/router/header_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ struct HeadersToAddEntry {
}

std::string original_value_;
bool add_if_empty_ = false;

Formatter::FormatterPtr formatter_;
HeaderAppendAction append_action_;
// Keep small members (bools and enums) at the end of class, to reduce alignment overhead.
bool add_if_empty_ = false;

protected:
HeadersToAddEntry(const HeaderValue& header_value, HeaderAppendAction append_action,
Expand Down

0 comments on commit e2cec22

Please sign in to comment.