mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 08:13:56 -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;
|
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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user