Commit baac9c39 authored by kenton@google.com's avatar kenton@google.com

Add some explicit casts to eliminate some warnings as described in issue 83 comment 17.

parent 33165fe0
...@@ -992,12 +992,12 @@ inline int CodedOutputStream::VarintSize32SignExtended(int32 value) { ...@@ -992,12 +992,12 @@ inline int CodedOutputStream::VarintSize32SignExtended(int32 value) {
} }
inline void CodedOutputStream::WriteString(const string& str) { inline void CodedOutputStream::WriteString(const string& str) {
WriteRaw(str.data(), str.size()); WriteRaw(str.data(), static_cast<int>(str.size()));
} }
inline uint8* CodedOutputStream::WriteStringToArray( inline uint8* CodedOutputStream::WriteStringToArray(
const string& str, uint8* target) { const string& str, uint8* target) {
return WriteRawToArray(str.data(), str.size(), target); return WriteRawToArray(str.data(), static_cast<int>(str.size()), target);
} }
inline int CodedOutputStream::ByteCount() const { inline int CodedOutputStream::ByteCount() const {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment