Remove redundant initialisations
The static buffers here are immediately passed in to be overwritten.
This commit is contained in:
parent
a8ef9d1437
commit
2e23b7cfba
@ -556,7 +556,7 @@ bool cByteBuffer::ReadUUID(cUUID & a_Value)
|
|||||||
{
|
{
|
||||||
CHECK_THREAD
|
CHECK_THREAD
|
||||||
|
|
||||||
std::array<Byte, 16> UUIDBuf = {0};
|
std::array<Byte, 16> UUIDBuf;
|
||||||
if (!ReadBuf(UUIDBuf.data(), UUIDBuf.size()))
|
if (!ReadBuf(UUIDBuf.data(), UUIDBuf.size()))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -76,7 +76,7 @@ Compression::Result Compression::Compressor::Compress(const void * const Input,
|
|||||||
{
|
{
|
||||||
// First see if the stack buffer has enough space:
|
// 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());
|
const auto BytesWrittenOut = Algorithm(m_Handle, Input, Size, Buffer.data(), Buffer.size());
|
||||||
|
|
||||||
if (BytesWrittenOut != 0)
|
if (BytesWrittenOut != 0)
|
||||||
@ -189,7 +189,7 @@ Compression::Result Compression::Extractor::Extract(const ContiguousByteBufferVi
|
|||||||
{
|
{
|
||||||
// First see if the stack buffer has enough space:
|
// First see if the stack buffer has enough space:
|
||||||
{
|
{
|
||||||
Result::Static Buffer = {static_cast<std::byte>(0)};
|
Result::Static Buffer;
|
||||||
size_t BytesWrittenOut;
|
size_t BytesWrittenOut;
|
||||||
|
|
||||||
switch (Algorithm(m_Handle, Input.data(), Input.size(), Buffer.data(), Buffer.size(), &BytesWrittenOut))
|
switch (Algorithm(m_Handle, Input.data(), Input.size(), Buffer.data(), Buffer.size(), &BytesWrittenOut))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user