From 19ca6005dd2cbe9c8a8419cd75df54547aee1d1d Mon Sep 17 00:00:00 2001 From: "alecf%netscape.com" Date: Tue, 27 Aug 2002 02:56:06 +0000 Subject: [PATCH] hmmm...backing out my change on unix only to if memcmp() is actually SLOWER (its faster on windows!) git-svn-id: svn://10.0.0.236/trunk@128212 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/base/nsID.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mozilla/xpcom/base/nsID.h b/mozilla/xpcom/base/nsID.h index e11aea756b6..45f5ca058a5 100644 --- a/mozilla/xpcom/base/nsID.h +++ b/mozilla/xpcom/base/nsID.h @@ -72,7 +72,15 @@ struct nsID { */ inline PRBool Equals(const nsID& other) const { +#ifdef XP_UNIX + 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])); +#else return (memcmp(this, &other, sizeof(*this)) == 0); +#endif } /**