Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
3 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/src/google/protobuf/map.h b/src/google/protobuf/map.h
index f0839fbd2..83432444a 100644
--- a/src/google/protobuf/map.h
+++ b/src/google/protobuf/map.h
@@ -680,7 +680,10 @@ inline map_index_t Hash(absl::string_view k, void* salt) {
 inline map_index_t Hash(uint64_t k, void* salt) {
-  if constexpr (!HasCrc32()) return absl::HashOf(k, salt);
-  uintptr_t salt_int = reinterpret_cast<uintptr_t>(salt);
-  // Note: Crc32(salt_int, k) causes the random iteration order test to fail so
-  // we also rotate.
-  return Crc32(salt_int, absl::rotr(k, salt_int & 0x3f));
+  if constexpr (!HasCrc32()) {
+    return absl::HashOf(k, salt);
+  } else {
+    uintptr_t salt_int = reinterpret_cast<uintptr_t>(salt);
+    // Note: Crc32(salt_int, k) causes the random iteration order test to fail so
+    // we also rotate.
+    return Crc32(salt_int, absl::rotr(k, salt_int & 0x3f));
+  }
 }