Source Code:
bool SkDescriptor::operator==(const SkDescriptor& other) const {
// the first value we should look at is the checksum, so this loop
// should terminate early if they descriptors are different.
// NOTE: if we wrote a sentinel value at the end of each, we could
// remove the aa < stop test in the loop...
const uint32_t* aa = (const uint32_t*)this;
const uint32_t* bb = (const uint32_t*)&other;
const uint32_t* stop = (const uint32_t*)((const char*)aa + fLength);
do {
if (*aa++ != *bb++)
return false;
} while (aa < stop);
return true;
}
why not use if(this.flength != other.fLength) return false;