Skip to content

Commit 1ff9a78

Browse files
committed
Remove nullable symbol for resource getters
Signed-off-by: Fung <fython@163.com>
1 parent bc2abdc commit 1ff9a78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kotlinyan-common/src/main/kotlin/moe/feng/kotlinyan/common/ResourcesExtensions.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ interface ResourcesExtensions {
3232
}
3333

3434
class DrawableResources internal constructor(private val res: Resources) {
35-
operator fun get(id: Int): Drawable? = res.getDrawable(id)
35+
operator fun get(id: Int): Drawable = res.getDrawable(id)
3636
}
3737

3838
class DimensionResources internal constructor(private val res: Resources) {
@@ -48,11 +48,11 @@ interface ResourcesExtensions {
4848
}
4949

5050
class LayoutResources internal constructor(private val res: Resources) {
51-
operator fun get(id: Int) : XmlResourceParser? = res.getLayout(id)
51+
operator fun get(id: Int) : XmlResourceParser = res.getLayout(id)
5252
}
5353

5454
class StringResources internal constructor(private val res: Resources) {
55-
operator fun get(id: Int) : String? = res.getString(id)
55+
operator fun get(id: Int) : String = res.getString(id)
5656
}
5757

5858
class StringArrayResources internal constructor(private val res: Resources) {

0 commit comments

Comments
 (0)