From be372d513f9ea640579d45293492b3db19c83160 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 4 Feb 2017 11:41:13 +0100 Subject: [PATCH] tweak the bit flag removing extension --- .../kotlin/com/simplemobiletools/calendar/extensions/Int.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/extensions/Int.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/extensions/Int.kt index 149e2631f..dbfc8db27 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/extensions/Int.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/extensions/Int.kt @@ -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