fix bug 164540 - make nsID::Parse faster by using memcmp
r=bbaetz, sr=darin git-svn-id: svn://10.0.0.236/trunk@128154 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user