commonMain.com.bselzer.ktx.compose.ui.layout.merge.Merge.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of compose-ui-layout-jvm Show documentation
Show all versions of compose-ui-layout-jvm Show documentation
Base extensions for laying out Compose Multiplatform UI.
package com.bselzer.ktx.compose.ui.layout.merge
/**
* Merges this object with the other object by taking the [other] object if it is not the [default], otherwise taking this object.
*/
internal fun T.safeMerge(other: T, default: T): T = if (other != default) other else this