From 9b6f42934e5a1e65ebfc668d91a28a6e2678a14c Mon Sep 17 00:00:00 2001 From: avi Date: Sat, 26 Dec 2015 14:15:14 -0800 Subject: 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} --- base/hash.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'base/hash.h') 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 +#include + #include #include #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(std::numeric_limits::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()); } -- cgit v1.1