diff options
author | 2022-06-08 15:28:46 +0000 | |
---|---|---|
committer | 2022-06-09 08:37:56 +0000 | |
commit | b205efd45ea29a2f21489056fbb0f0309ba992d2 (patch) | |
tree | 4aee8ca270c14d258af8769e8b18879ca4186ea2 /cmdline | |
parent | 72eccf5064889f7cba5a7651642e338f9e711f8a (diff) |
Fix performance-unnecessary-value-param clang-tidy issues
Test: m tidy-art
Bug: 213953102
Change-Id: Ibe16d59559d96e0a4562ecd2af1dffa28bafc068
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/token_range.h | 4 | ||||
-rw-r--r-- | cmdline/unit.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/cmdline/token_range.h b/cmdline/token_range.h index e28ead92df..e917e1d6d0 100644 --- a/cmdline/token_range.h +++ b/cmdline/token_range.h @@ -81,7 +81,7 @@ struct TokenRange { {} // Non-copying constructor. Retain reference to existing list of tokens. - TokenRange(std::shared_ptr<TokenList> token_list, + TokenRange(const std::shared_ptr<TokenList>& token_list, TokenList::const_iterator it_begin, TokenList::const_iterator it_end) : token_list_(token_list), @@ -98,7 +98,7 @@ struct TokenRange { TokenRange(TokenRange&&) = default; // Non-copying constructor. Retains reference to an existing list of tokens, with offset. - explicit TokenRange(std::shared_ptr<TokenList> token_list) + explicit TokenRange(const std::shared_ptr<TokenList>& token_list) : token_list_(token_list), begin_(token_list_->begin()), end_(token_list_->end()) diff --git a/cmdline/unit.h b/cmdline/unit.h index f73981fbd3..b049d62a82 100644 --- a/cmdline/unit.h +++ b/cmdline/unit.h @@ -27,7 +27,7 @@ struct Unit { Unit() {} Unit(const Unit&) = default; ~Unit() {} - bool operator==(Unit) const { + bool operator==(const Unit&) const { return true; } }; |