tweak the bit flag removing extension
This commit is contained in:
parent
fc81e5ab42
commit
be372d513f
|
@ -1,4 +1,4 @@
|
|||
package com.simplemobiletools.calendar.extensions
|
||||
|
||||
// TODO: how to do "flags & ~flag" in kotlin?
|
||||
fun Int.removeFlag(flag: Int) = this - (if (this and flag != 0) flag else 0)
|
||||
fun Int.removeFlag(flag: Int) = this or flag - flag
|
||||
|
|
Loading…
Reference in New Issue