소스 검색

Add missing explicit const_cast

Johan Jansen 6 년 전
부모
커밋
94fc229c44
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      httplib.h

+ 1 - 1
httplib.h

@@ -1267,7 +1267,7 @@ inline bool compress(std::string &content) {
   if (ret != Z_OK) { return false; }
 
   strm.avail_in = content.size();
-  strm.next_in = reinterpret_cast<Bytef*>(content.data());
+  strm.next_in = const_cast<Bytef*>(reinterpret_cast<const Bytef*>(content.data()));
 
   std::string compressed;