diff options
author | Bo Yang <teboring@google.com> | 2017-06-23 12:56:44 -0700 |
---|---|---|
committer | Bo Yang <paulyang1211@gmail.com> | 2017-06-24 11:28:13 -0700 |
commit | e3c807d4e752b477b707f5d021264faf9b127304 (patch) | |
tree | 505092dff769b14d6a07be62314bc948b9398090 /src/google/protobuf/stubs/hash.h | |
parent | 9c0b35cf620c4904a18e25733f50c9c0474fefa6 (diff) | |
download | protobuf-e3c807d4e752b477b707f5d021264faf9b127304.tar.gz protobuf-e3c807d4e752b477b707f5d021264faf9b127304.tar.bz2 protobuf-e3c807d4e752b477b707f5d021264faf9b127304.zip |
Fix more implicit type conversions in public headers and generated code.
Diffstat (limited to 'src/google/protobuf/stubs/hash.h')
-rw-r--r-- | src/google/protobuf/stubs/hash.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/stubs/hash.h b/src/google/protobuf/stubs/hash.h index be998b29..a997e04b 100644 --- a/src/google/protobuf/stubs/hash.h +++ b/src/google/protobuf/stubs/hash.h @@ -348,7 +348,7 @@ struct hash<const char*> { inline size_t operator()(const char* str) const { size_t result = 0; for (; *str != '\0'; str++) { - result = 5 * result + *str; + result = 5 * result + static_cast<size_t>(*str); } return result; } |