Skip to content

Commit abcc69a

Browse files
committed
fix warning [cast from type ‘const char*’ to type ‘Bytef*’] in zlibtuils.cpp
1 parent ebff401 commit abcc69a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vpr/src/server/zlibutils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ std::string tryCompress(const std::string& decompressed)
1212
return "";
1313
}
1414

15-
zs.next_in = (Bytef*)decompressed.data();
15+
zs.next_in = reinterpret_cast<Bytef*>(const_cast<char*>(decompressed.data()));
1616
zs.avail_in = decompressed.size();
1717

1818
int retCode;
@@ -48,7 +48,7 @@ std::string tryDecompress(const std::string& compressed)
4848
return "";
4949
}
5050

51-
zs.next_in = (Bytef*)compressed.data();
51+
zs.next_in = reinterpret_cast<Bytef*>(const_cast<char*>(compressed.data()));
5252
zs.avail_in = compressed.size();
5353

5454
int retCode;

0 commit comments

Comments
 (0)