Skip to content

Commit

Permalink
Add some explicit casts to eliminate some warnings as described in is…
Browse files Browse the repository at this point in the history
…sue 83 comment 17.
  • Loading branch information
[email protected] committed Nov 30, 2010
1 parent 33165fe commit baac9c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/google/protobuf/io/coded_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -992,12 +992,12 @@ inline int CodedOutputStream::VarintSize32SignExtended(int32 value) {
}

inline void CodedOutputStream::WriteString(const string& str) {
WriteRaw(str.data(), str.size());
WriteRaw(str.data(), static_cast<int>(str.size()));
}

inline uint8* CodedOutputStream::WriteStringToArray(
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 {
Expand Down

0 comments on commit baac9c3

Please sign in to comment.