mirror of
https://github.com/exyte/Macaw.git
synced 2024-09-11 13:15:35 +03:00
Simplify nesting with compound if-let
This commit is contained in:
parent
995dd5344d
commit
b81e82372c
@ -299,14 +299,10 @@ open class SVGParser {
|
||||
var green = 0.0
|
||||
var blue = 0.0
|
||||
if (x.count == 3) {
|
||||
if let r = Double(x[0]) {
|
||||
if let r = Double(x[0]), let g = Double(x[1]), let b = Double(x[2]) {
|
||||
blue = b
|
||||
green = g
|
||||
red = r
|
||||
if let g = Double(x[1]) {
|
||||
green = g
|
||||
if let b = Double(x[2]) {
|
||||
blue = b
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if inPercentage {
|
||||
|
Loading…
Reference in New Issue
Block a user