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:
alecf%netscape.com
2002-08-26 20:47:34 +00:00
parent f0e3bbb854
commit b1ea054b38

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