mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 23:33:57 -04:00
AP_Common: Bitmask: use sizeof() in place of constant
This commit is contained in:
parent
e4bc874083
commit
a7ce326307
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user