fix bug 164540 - make nsID::Parse faster by using memcmp

r=bbaetz, sr=darin
This commit is contained in:
alecf%netscape.com 2002-08-26 20:47:34 +00:00
parent 68bb18db7f
commit 7b1a6876d2

View File

@ -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);
}
/**