From d9f1a90c772719d14540eb2bf7bc3b8384fa7a72 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Thu, 20 Jun 2019 22:33:54 +0200 Subject: Suppress some style warnings. --- .../src/main/kotlin/pl/treksoft/kvision/cordova/Geolocation.kt | 1 + .../kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Media.kt | 1 + .../src/main/kotlin/pl/treksoft/kvision/cordova/MediaCapture.kt | 1 + 3 files changed, 3 insertions(+) (limited to 'kvision-modules') diff --git a/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Geolocation.kt b/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Geolocation.kt index 4087a4f2..c4ccd354 100644 --- a/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Geolocation.kt +++ b/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Geolocation.kt @@ -251,6 +251,7 @@ object Locationservices { } } + @Suppress("MagicNumber") private fun getJsPriority(priority: Priority): dynamic { return when (priority) { Priority.PRIORITY_HIGH_ACCURACY -> 100 diff --git a/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Media.kt b/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Media.kt index 6ea43d76..a126941b 100644 --- a/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Media.kt +++ b/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Media.kt @@ -43,6 +43,7 @@ external class MediaError { /** * Cordova media class. */ +@Suppress("TooManyFunctions") external class Media( src: String, mediaSuccess: (() -> Unit)? = definedExternally, diff --git a/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/MediaCapture.kt b/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/MediaCapture.kt index c7b427dc..fda81da7 100644 --- a/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/MediaCapture.kt +++ b/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/MediaCapture.kt @@ -100,6 +100,7 @@ object MediaCapture { CAPTURE_NOT_SUPPORTED } + @Suppress("MagicNumber") private fun codeToEnum(code: Int): CaptureErrorCode { return when (code) { 0 -> CaptureErrorCode.CAPTURE_INTERNAL_ERR -- cgit