Code cleanup: redundant modality (minor)
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ interface Evaluator : (List<Conditional>) -> Boolean
|
||||
interface PlatformEvaluator : Evaluator {
|
||||
override fun invoke(conditions: List<Conditional>): Boolean = evaluate(conditions.filterIsInstance<Conditional.PlatformVersion>())
|
||||
|
||||
open fun evaluate(conditions: List<Conditional.PlatformVersion>): Boolean
|
||||
fun evaluate(conditions: List<Conditional.PlatformVersion>): Boolean
|
||||
= conditions.isEmpty() || conditions.any { match(it) }
|
||||
|
||||
fun match(platformCondition: Conditional.PlatformVersion): Boolean
|
||||
|
||||
@@ -83,11 +83,11 @@ abstract class PerformanceCounter protected constructor(val name: String) {
|
||||
}
|
||||
}
|
||||
|
||||
final fun increment() {
|
||||
fun increment() {
|
||||
count++
|
||||
}
|
||||
|
||||
final fun <T> time(block: () -> T): T {
|
||||
fun <T> time(block: () -> T): T {
|
||||
count++
|
||||
if (!enabled) return block()
|
||||
|
||||
@@ -105,7 +105,7 @@ abstract class PerformanceCounter protected constructor(val name: String) {
|
||||
totalTimeNanos = 0
|
||||
}
|
||||
|
||||
protected final fun incrementTime(delta: Long) {
|
||||
protected fun incrementTime(delta: Long) {
|
||||
totalTimeNanos += delta
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -165,7 +165,7 @@ abstract class CallCase<in I : CallInfo> {
|
||||
|
||||
protected open fun I.bothReceivers(): JsExpression = unsupported()
|
||||
|
||||
final fun translate(callInfo: I): JsExpression {
|
||||
fun translate(callInfo: I): JsExpression {
|
||||
val result = if (callInfo.dispatchReceiver == null) {
|
||||
if (callInfo.extensionReceiver == null)
|
||||
callInfo.noReceivers()
|
||||
|
||||
Reference in New Issue
Block a user