diff --git a/libraries/AP_Common/Bitmask.h b/libraries/AP_Common/Bitmask.h index 24ee2fcf1b..4662a2a219 100644 --- a/libraries/AP_Common/Bitmask.h +++ b/libraries/AP_Common/Bitmask.h @@ -39,16 +39,12 @@ public: } Bitmask &operator=(const Bitmask&other) { - memcpy(bits, other.bits, sizeof(bits[0])*other.numwords); + memcpy(bits, other.bits, sizeof(bits[0])*numwords); return *this; } bool operator==(const Bitmask&other) { - if (other.numbits != numbits) { - return false; - } else { - return memcmp(bits, other.bits, sizeof(bits[0])*numwords) == 0; - } + return memcmp(bits, other.bits, sizeof(bits[0])*numwords) == 0; } bool operator!=(const Bitmask&other) {