More efficient Char(Int) in common, JS, and JS-IR
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -27,4 +27,4 @@ internal fun doubleToInt(a: Double): Int = when {
|
||||
else -> jsBitwiseOr(a, 0)
|
||||
}
|
||||
|
||||
internal fun numberToChar(a: dynamic) = Char(numberToInt(a) and 0xFFFF)
|
||||
internal fun numberToChar(a: dynamic) = Char(numberToInt(a).toUShort())
|
||||
Reference in New Issue
Block a user