Suppress inline warning
Without this suppression, building the code prints: ``` frameworks/base/packages/SystemUI/src/com/android/systemui/util/kotlin/nullability.kt:29:1: warning: expected performance impact from inlining is insignificant. Inlining works best for functions with parameters of functional types inline fun <T> Optional<T>.getOrNull(): T? = orElse(null) ^ ``` Reviewing the documentation here: https://kotlinlang.org/docs/inline-functions.html It seems that the inline warning fires if there are no inlinable function parameters and no reified type parameters, as is the case here. However the original author of the code still thinks this is a reasonable target for inlining as a short method and a common utility, and I don't disagree. I'm suppressing the warning because it seems to be unhelpful, and because build warnings are considered tech debt as per: go/battledroids#clean-up-build-warnings Test: built, warning no longer appears Bug: 217776569 Change-Id: Ic94f4e7d1612679c67e7aaaa46dc884f2f60b7d4
Loading
Please register or sign in to comment