-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid unnecessary strings/cord.h include
- Loading branch information
Showing
5 changed files
with
59 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#if defined(ABSL_STRINGS_CORD_H_) && \ | ||
defined(ABSL_CONTAINER_INTERNAL_HASH_FUNCTION_DEFAULTS_H_) | ||
|
||
#ifndef ABSL_CONTAINER_INTERNAL_HASH_FUNCTION_CORD_H_ | ||
#define ABSL_CONTAINER_INTERNAL_HASH_FUNCTION_CORD_H_ | ||
|
||
namespace container_internal { | ||
|
||
inline size_t StringHash::operator()(const absl::Cord& v) const { | ||
return absl::Hash<absl::Cord>{}(v); | ||
} | ||
inline bool StringEq::operator()(const absl::Cord& lhs, const Cord& rhs) const { | ||
return lhs == rhs; | ||
} | ||
inline bool StringEq::operator()(const absl::Cord& lhs, | ||
absl::string_view rhs) const { | ||
return lhs == rhs; | ||
} | ||
inline bool StringEq::operator()(absl::string_view lhs, | ||
const absl::Cord& rhs) const { | ||
return lhs == rhs; | ||
} | ||
|
||
} // namespace container_internal | ||
|
||
#endif // ABSL_CONTAINER_INTERNAL_HASH_FUNCTION_CORD_H_ | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters