mirror of
https://github.com/nzbget/nzbget.git
synced 2025-12-23 22:27:45 -05:00
fix compile warning: -Wclass-memaccess
Use value-initialization instead of clearing an object with memset.
This commit is contained in:
@@ -230,16 +230,14 @@ inline bool ReedSolomon<g>::Compute(CommandLine::NoiseLevel noiselevel)
|
||||
|
||||
// Allocate the left hand matrix
|
||||
|
||||
leftmatrix = new G[outcount * incount];
|
||||
memset(leftmatrix, 0, outcount * incount * sizeof(G));
|
||||
leftmatrix = new G[outcount * incount]();
|
||||
|
||||
// Allocate the right hand matrix only if we are recovering
|
||||
|
||||
G *rightmatrix = 0;
|
||||
if (datamissing > 0)
|
||||
{
|
||||
rightmatrix = new G[outcount * outcount];
|
||||
memset(rightmatrix, 0, outcount *outcount * sizeof(G));
|
||||
rightmatrix = new G[outcount * outcount]();
|
||||
}
|
||||
|
||||
// Fill in the two matrices:
|
||||
|
||||
Reference in New Issue
Block a user