btSerializer: Remove unused but set variable

Fixes a Clang/Emscripten warning.
This commit is contained in:
Rémi Verschelde 2021-09-29 16:05:11 +02:00
parent ce26271923
commit 364796d1e5
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -499,7 +499,6 @@ public:
writeDNA();
//if we didn't pre-allocate a buffer, we need to create a contiguous buffer now
int mysize = 0;
if (!m_totalSize)
{
if (m_buffer)
@ -511,14 +510,12 @@ public:
unsigned char* currentPtr = m_buffer;
writeHeader(m_buffer);
currentPtr += BT_HEADER_LENGTH;
mysize += BT_HEADER_LENGTH;
for (int i = 0; i < m_chunkPtrs.size(); i++)
{
int curLength = sizeof(btChunk) + m_chunkPtrs[i]->m_length;
memcpy(currentPtr, m_chunkPtrs[i], curLength);
btAlignedFree(m_chunkPtrs[i]);
currentPtr += curLength;
mysize += curLength;
}
}