mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Add [[nodiscard]] decorations to fml::HashCombine. (flutter/engine#27343)
This makes it easier to catch errors when HashCombine was used instead of HashCombineSeed.
This commit is contained in:
parent
bf96d4bbc8
commit
17aff107e9
@ -22,12 +22,12 @@ constexpr void HashCombineSeed(std::size_t& seed,
|
||||
HashCombineSeed(seed, other_args...);
|
||||
}
|
||||
|
||||
constexpr std::size_t HashCombine() {
|
||||
[[nodiscard]] constexpr std::size_t HashCombine() {
|
||||
return 0xdabbad00;
|
||||
}
|
||||
|
||||
template <class... Type>
|
||||
constexpr std::size_t HashCombine(Type... args) {
|
||||
[[nodiscard]] constexpr std::size_t HashCombine(Type... args) {
|
||||
std::size_t seed = HashCombine();
|
||||
HashCombineSeed(seed, args...);
|
||||
return seed;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user