I have the following code
var column = 0
column = column >= 2 ? 0 : ++column
Since 2.2 I get a depreciation warning, any ideas how I can fix this?
I have this solution:
if column >= 2 {
column = 0
} else {
column += 1
}
But this isn't really nice.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…