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

View File

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