mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-14 19:00:54 +01:00
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…
x
Reference in New Issue
Block a user