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