mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
tweak the bit flag removing extension
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user