Browse Source

Use static cast

Used static cast to improve initalization compatibility with MSVC2010
Hamdi Sahloul 10 years ago
parent
commit
4ead55c370
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/google/protobuf/util/json_util_test.cc

+ 1 - 1
src/google/protobuf/util/json_util_test.cc

@@ -163,7 +163,7 @@ typedef pair<char*, int> Segment;
 class SegmentedZeroCopyOutputStream : public io::ZeroCopyOutputStream {
 class SegmentedZeroCopyOutputStream : public io::ZeroCopyOutputStream {
  public:
  public:
   explicit SegmentedZeroCopyOutputStream(list<Segment> segments)
   explicit SegmentedZeroCopyOutputStream(list<Segment> segments)
-      : segments_(segments), last_segment_((char*)NULL, 0), byte_count_(0) {}
+      : segments_(segments), last_segment_(static_cast<char*>(NULL), 0), byte_count_(0) {}
 
 
   virtual bool Next(void** buffer, int* length) {
   virtual bool Next(void** buffer, int* length) {
     if (segments_.empty()) {
     if (segments_.empty()) {