From ec87f5066b4640847f2799b256a9c782ceedc620 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 25 Oct 2017 18:58:24 +0200 Subject: [PATCH] remove a redundant local variable --- .../kotlin/com/simplemobiletools/calendar/helpers/DBHelper.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/DBHelper.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/DBHelper.kt index 19596c6c9..ed70224db 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/DBHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/helpers/DBHelper.kt @@ -791,8 +791,8 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont } val events = ArrayList() - cursor.use { cursor -> - if (cursor != null && cursor.moveToFirst()) { + cursor?.use { + if (cursor.moveToFirst()) { do { val id = cursor.getIntValue(COL_ID) val startTS = cursor.getIntValue(COL_START_TS)