소스 검색

VS2010 compatibility of address initalization

VS2010 cannot compile json_util_test.cc since it assumes NULL as a zero (int), and therefore cannot convert into to char*
Hamdi Sahloul 10 년 전
부모
커밋
4c4aae87d5
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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 {
  public:
   explicit SegmentedZeroCopyOutputStream(list<Segment> segments)
-      : segments_(segments), last_segment_(NULL, 0), byte_count_(0) {}
+      : segments_(segments), last_segment_((char*)NULL, 0), byte_count_(0) {}
 
   virtual bool Next(void** buffer, int* length) {
     if (segments_.empty()) {