mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
log: avoid double hashing in SourceLocationHasher
Co-Authored-By: l0rinc <pap.lorinc@gmail.com> Github-Pull: #33011 Rebased-From: b8e92fb3d4137f91fe6a54829867fc54357da648
This commit is contained in:
parent
25f975b8df
commit
9cde68fa98
1 changed files with 4 additions and 4 deletions
|
|
@ -46,10 +46,10 @@ struct SourceLocationHasher {
|
|||
size_t operator()(const std::source_location& s) const noexcept
|
||||
{
|
||||
// Use CSipHasher(0, 0) as a simple way to get uniform distribution.
|
||||
return static_cast<size_t>(CSipHasher(0, 0)
|
||||
.Write(std::hash<std::string_view>{}(s.file_name()))
|
||||
.Write(s.line())
|
||||
.Finalize());
|
||||
return size_t(CSipHasher(0, 0)
|
||||
.Write(s.line())
|
||||
.Write(MakeUCharSpan(std::string_view{s.file_name()}))
|
||||
.Finalize());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue