diff --git a/mozilla/xpcom/base/nsID.h b/mozilla/xpcom/base/nsID.h index 548cef741f3..e11aea756b6 100644 --- a/mozilla/xpcom/base/nsID.h +++ b/mozilla/xpcom/base/nsID.h @@ -72,11 +72,7 @@ struct nsID { */ inline PRBool Equals(const nsID& other) const { - return (PRBool) - ((((PRUint32*) &m0)[0] == ((PRUint32*) &other.m0)[0]) && - (((PRUint32*) &m0)[1] == ((PRUint32*) &other.m0)[1]) && - (((PRUint32*) &m0)[2] == ((PRUint32*) &other.m0)[2]) && - (((PRUint32*) &m0)[3] == ((PRUint32*) &other.m0)[3])); + return (memcmp(this, &other, sizeof(*this)) == 0); } /**