diff options
author | avi <avi@chromium.org> | 2015-12-26 14:15:14 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-26 22:16:15 +0000 |
commit | 9b6f42934e5a1e65ebfc668d91a28a6e2678a14c (patch) | |
tree | 6fb35dc2e15b6aeb7ce5d8fb2daf08f58c6d77e7 /base/hash.h | |
parent | 28523e2cf18ee02f503e1792788b88d828968055 (diff) | |
download | chromium_src-9b6f42934e5a1e65ebfc668d91a28a6e2678a14c.zip chromium_src-9b6f42934e5a1e65ebfc668d91a28a6e2678a14c.tar.gz chromium_src-9b6f42934e5a1e65ebfc668d91a28a6e2678a14c.tar.bz2 |
Switch to standard integer types in base/.
BUG=138542
TBR=mark@chromium.org
NOPRESUBMIT=true
Review URL: https://codereview.chromium.org/1538743002
Cr-Commit-Position: refs/heads/master@{#366910}
Diffstat (limited to 'base/hash.h')
-rw-r--r-- | base/hash.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/base/hash.h b/base/hash.h index e46f6ac..ed8d9fd 100644 --- a/base/hash.h +++ b/base/hash.h @@ -5,21 +5,23 @@ #ifndef BASE_HASH_H_ #define BASE_HASH_H_ +#include <stddef.h> +#include <stdint.h> + #include <limits> #include <string> #include "base/base_export.h" -#include "base/basictypes.h" #include "base/logging.h" namespace base { // WARNING: This hash function should not be used for any cryptographic purpose. -BASE_EXPORT uint32 SuperFastHash(const char* data, int len); +BASE_EXPORT uint32_t SuperFastHash(const char* data, int len); // Computes a hash of a memory buffer |data| of a given |length|. // WARNING: This hash function should not be used for any cryptographic purpose. -inline uint32 Hash(const char* data, size_t length) { +inline uint32_t Hash(const char* data, size_t length) { if (length > static_cast<size_t>(std::numeric_limits<int>::max())) { NOTREACHED(); return 0; @@ -29,7 +31,7 @@ inline uint32 Hash(const char* data, size_t length) { // Computes a hash of a string |str|. // WARNING: This hash function should not be used for any cryptographic purpose. -inline uint32 Hash(const std::string& str) { +inline uint32_t Hash(const std::string& str) { return Hash(str.data(), str.size()); } |