reformat per coding conventions

This commit is contained in:
Kevin Hester 2021-03-29 20:33:06 +08:00
parent 2c75d0dee7
commit 5b653d29f8
29 changed files with 207 additions and 149 deletions

View file

@ -5,14 +5,15 @@ import com.geeksville.android.Logging
/**
* Provide structured access to parse and compare device version strings
*/
data class DeviceVersion(val asString: String): Comparable<DeviceVersion>, Logging {
data class DeviceVersion(val asString: String) : Comparable<DeviceVersion>, Logging {
val asInt get() = try {
verStringToInt(asString)
} catch(e: Exception) {
warn("Exception while parsing version '$asString', assuming version 0")
0
}
val asInt
get() = try {
verStringToInt(asString)
} catch (e: Exception) {
warn("Exception while parsing version '$asString', assuming version 0")
0
}
/**
* Convert a version string of the form 1.23.57 to a comparable integer of