зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1290614, part 6 - Hoist out the common loop over all interfaces in XPCNativeSetKey::Hash(). r=mrbkap
Both cases first hash together all of the existing interfaces. MozReview-Commit-ID: AnUF5uPSPpN --HG-- extra : rebase_source : 43ac016974d3ee4dfbd92361348aeeae5b6a793c
This commit is contained in:
Родитель
c2ef63a1b9
Коммит
bcc1ce175d
|
@ -442,14 +442,12 @@ XPCNativeSetKey::Hash() const
|
|||
} else {
|
||||
XPCNativeInterface** current = mBaseSet->GetInterfaceArray();
|
||||
uint16_t count = mBaseSet->GetInterfaceCount();
|
||||
for (uint16_t i = 0; i < count; i++) {
|
||||
h ^= HashPointer(*(current++));
|
||||
}
|
||||
|
||||
if (mAddition) {
|
||||
for (uint16_t i = 0; i < count; i++) {
|
||||
h ^= HashPointer(*(current++));
|
||||
}
|
||||
h ^= HashPointer(mAddition);
|
||||
} else {
|
||||
for (uint16_t i = 0; i < count; i++)
|
||||
h ^= HashPointer(*(current++));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче