3 ms·
Is this the correct approach? BOOL end = mask & NSEventMaskEndGesture ? YES : NO;
by MaxGabriel 12y ago
Is this the correct approach?
BOOL end = mask & NSEventMaskEndGesture ? YES : NO;
- al_gore 12y agoor just != 0
- plorkyeran 12y ago(mask & NSEventMaskEndGesture) == NSEventMaskEndGesture is the most correct, as it handles the case where NSEventMaskEndGesture has multiple bits set.
- deleted 12y ago[deleted]
- ridiculous_fish 12y agoI think, not!! BOOL end = !! (mask & NSEventMaskEndGesture); Like a little pair of surprised eyes. Also works for pointers: BOOL hasError = !! errorObj;