tweak the bit flag removing extension

This commit is contained in:
tibbi 2017-02-04 11:41:13 +01:00
parent fc81e5ab42
commit be372d513f
1 changed files with 1 additions and 1 deletions

View File

@ -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