Commit 0197c69c authored by Kenton Varda's avatar Kenton Varda Committed by GitHub

Merge pull request #427 from dwrensha/remove-pointless-memset

omit needless memset
parents ae45349f 2b7629e4
......@@ -1611,11 +1611,6 @@ struct WireHelpers {
}
} else {
memcpy(ptr, value.data, dataSize / BYTES);
if (dataSize % BYTES_PER_WORD != 0 * BYTES) {
//Zero-pad the data if it didn't use the entire last word
byte* padStart = reinterpret_cast<byte*>(ptr) + (dataSize / BYTES);
memset(padStart, 0, (BYTES_PER_WORD * WORDS - (dataSize % BYTES_PER_WORD)) / BYTES);
}
}
WirePointer* pointerSection = reinterpret_cast<WirePointer*>(ptr + dataWords);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment