mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
fix bug 164540 - make nsID::Parse faster by using memcmp
r=bbaetz, sr=darin
This commit is contained in:
parent
68bb18db7f
commit
7b1a6876d2
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user