AP_Common: Bitmask: use sizeof() in place of constant

This commit is contained in:
Peter Barker 2018-12-07 09:51:20 +11:00 committed by Randy Mackay
parent e4bc874083
commit a7ce326307
1 changed files with 1 additions and 4 deletions

View File

@ -18,10 +18,7 @@ Bitmask &Bitmask::operator=(const Bitmask&other)
}
numbits = other.numbits;
}
if (other.numwords > 20) {
abort();
}
memcpy(bits, other.bits, 4*other.numwords);
memcpy(bits, other.bits, sizeof(bits[0])*other.numwords);
return *this;
}