|
Align base::hash_map with C++11, part 2.
MSVC's stdext::hash_map, unlike C++11's std::unordered_map and GCC's
__gnu_cxx::hash_map, requires a total order on the key. It also has a very
different syntax for supplying a default hash function.
Switch MSVC to std::unordered_map, but exposed as base::hash_map. This aligns
both the container and the default hash function. The default hash function now
differs from our GCC one in that const char * is no longer hashed as a C string.
To align GCC with C++11 semantics and the MSVC ones this CL introduces, also
provide a new hash function and swap the default hash with it. This new
function is identical to __gnu_cxx::hash, but it does not specialize const
char* and does specialize T* (which was already aligned by
https://codereview.chromium.org/630503002/).
Note: This CL changes a file in mojo/ and will need to be mirrored in the
mojo repository before the next sync.
BUG= 420242
Committed: https://crrev.com/44d2e5c45975ab36f29035552521e41ae512c8bf
Cr-Commit-Position: refs/heads/master@{#301185}
Total comments: 3
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+105 lines, -213 lines) |
Patch |
 |
M |
base/containers/hash_tables.h
|
View
|
1
|
7 chunks |
+88 lines, -35 lines |
0 comments
|
Download
|
 |
M |
base/containers/hash_tables_unittest.cc
|
View
|
|
2 chunks |
+14 lines, -0 lines |
0 comments
|
Download
|
 |
M |
base/containers/small_map_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
base/files/file_path.h
|
View
|
1
2
3
4
5
|
3 chunks |
+0 lines, -10 lines |
0 comments
|
Download
|
 |
M |
base/strings/string_piece.h
|
View
|
|
2 chunks |
+0 lines, -12 lines |
0 comments
|
Download
|
 |
M |
cc/quads/render_pass.h
|
View
|
1
|
1 chunk |
+0 lines, -8 lines |
0 comments
|
Download
|
 |
M |
cc/surfaces/surface_id.h
|
View
|
1
2
3
4
5
|
2 chunks |
+0 lines, -9 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/browsing_data/canonical_cookie_hash.h
|
View
|
1
2
3
4
5
|
3 chunks |
+0 lines, -45 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync_file_system/drive_backend/metadata_database_index.h
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -7 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/zoom/chrome_zoom_level_prefs.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/common/host_shared_bitmap_manager.h
|
View
|
1
2
3
4
5
|
2 chunks |
+0 lines, -7 lines |
0 comments
|
Download
|
 |
M |
content/renderer/pepper/v8_var_converter.cc
|
View
|
1
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
 |
M |
mojo/edk/system/channel_endpoint_id.h
|
View
|
1
2
|
3 chunks |
+1 line, -11 lines |
0 comments
|
Download
|
 |
M |
net/dns/dns_hosts.h
|
View
|
|
2 chunks |
+0 lines, -9 lines |
0 comments
|
Download
|
 |
M |
tools/gn/label.h
|
View
|
1
2
3
4
5
|
3 chunks |
+0 lines, -10 lines |
0 comments
|
Download
|
 |
M |
tools/gn/label_ptr.h
|
View
|
|
1 chunk |
+0 lines, -7 lines |
0 comments
|
Download
|
 |
M |
tools/gn/output_file.h
|
View
|
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
tools/gn/source_dir.h
|
View
|
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
tools/gn/source_file.h
|
View
|
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
tools/gn/unique_vector.h
|
View
|
|
2 chunks |
+0 lines, -13 lines |
0 comments
|
Download
|
Total messages: 26 (5 generated)
|