diff options
| author | karpik <[email protected]> | 2022-02-10 16:49:23 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:49:23 +0300 |
| commit | eb4b8b8ee0d18f168ae14f4d88a6efe2498e0f78 (patch) | |
| tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/generic/guid.h | |
| parent | 9cb2cb2fdceae44848ab4504f5e445015b0eca6e (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'util/generic/guid.h')
| -rw-r--r-- | util/generic/guid.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/util/generic/guid.h b/util/generic/guid.h index 94557e6f994..2bf6c8ad99c 100644 --- a/util/generic/guid.h +++ b/util/generic/guid.h @@ -1,5 +1,5 @@ -#pragma once - +#pragma once + #include "fwd.h" #include <util/str_stl.h> @@ -16,7 +16,7 @@ */ struct TGUID { ui32 dw[4] = {}; - + constexpr bool IsEmpty() const noexcept { return (dw[0] | dw[1] | dw[2] | dw[3]) == 0; } @@ -42,7 +42,7 @@ struct TGUID { * https://datatracker.ietf.org/doc/html/rfc4122#section-4.1 **/ static TGUID CreateTimebased(); -}; +}; constexpr bool operator==(const TGUID& a, const TGUID& b) noexcept { return a.dw[0] == b.dw[0] && a.dw[1] == b.dw[1] && a.dw[2] == b.dw[2] && a.dw[3] == b.dw[3]; @@ -56,7 +56,7 @@ struct TGUIDHash { constexpr int operator()(const TGUID& a) const noexcept { return a.dw[0] + a.dw[1] + a.dw[2] + a.dw[3]; } -}; +}; template <> struct THash<TGUID> { |
