summaryrefslogtreecommitdiffstats
path: root/src/StringCompression.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2022-06-02 01:28:14 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2022-06-02 01:29:45 +0200
commit2e23b7cfba344bd24ae202b26ff280a57748570d (patch)
tree254d21038cc1134b910465266dff1fcadbcfe37b /src/StringCompression.cpp
parentAvoid spawn of silverfish when exploded by tnt (#5420) (diff)
downloadcuberite-2e23b7cfba344bd24ae202b26ff280a57748570d.tar
cuberite-2e23b7cfba344bd24ae202b26ff280a57748570d.tar.gz
cuberite-2e23b7cfba344bd24ae202b26ff280a57748570d.tar.bz2
cuberite-2e23b7cfba344bd24ae202b26ff280a57748570d.tar.lz
cuberite-2e23b7cfba344bd24ae202b26ff280a57748570d.tar.xz
cuberite-2e23b7cfba344bd24ae202b26ff280a57748570d.tar.zst
cuberite-2e23b7cfba344bd24ae202b26ff280a57748570d.zip
Diffstat (limited to 'src/StringCompression.cpp')
-rw-r--r--src/StringCompression.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/StringCompression.cpp b/src/StringCompression.cpp
index d82f45987..6678fe1bd 100644
--- a/src/StringCompression.cpp
+++ b/src/StringCompression.cpp
@@ -76,7 +76,7 @@ Compression::Result Compression::Compressor::Compress(const void * const Input,
{
// First see if the stack buffer has enough space:
{
- Result::Static Buffer = {static_cast<std::byte>(0)};
+ Result::Static Buffer;
const auto BytesWrittenOut = Algorithm(m_Handle, Input, Size, Buffer.data(), Buffer.size());
if (BytesWrittenOut != 0)
@@ -189,7 +189,7 @@ Compression::Result Compression::Extractor::Extract(const ContiguousByteBufferVi
{
// First see if the stack buffer has enough space:
{
- Result::Static Buffer = {static_cast<std::byte>(0)};
+ Result::Static Buffer;
size_t BytesWrittenOut;
switch (Algorithm(m_Handle, Input.data(), Input.size(), Buffer.data(), Buffer.size(), &BytesWrittenOut))