Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(983)

Unified Diff: base/location.h

Issue 1449173002: Change the cast in base::Location::Hash to uintptr_t. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@location-hash-size-t
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/location.h
diff --git a/base/location.h b/base/location.h
index 477dc022273960d87bf2d618f9366ab6efe3d65d..8f77f7ed857fc0f57d19ebfc71d6e3dd7d05088a 100644
--- a/base/location.h
+++ b/base/location.h
@@ -58,11 +58,7 @@ class BASE_EXPORT Location {
// it comes from __FILE__, so no need to check the contents of the string.
// See the definition of FROM_HERE in location.h, and how it is used
// elsewhere.
-
- // Due to inconsistent definitions of uint64_t and uintptr_t, casting the
- // file name pointer to a uintptr_t causes a compiler error for some
danakj 2015/12/02 20:49:41 No more compiler errors? Cool. LGTM
- // platforms. The solution is to explicitly cast it to a uint64_t.
- return base::HashPair(reinterpret_cast<uint64_t>(location.file_name()),
+ return base::HashPair(reinterpret_cast<uintptr_t>(location.file_name()),
location.line_number());
}
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698