Browse Source

chore: revert code style changes

pull/4500/head
Chanjung Kim 9 months ago
parent
commit
97f6cf8796
  1. 3
      components/resources/library/src/wasmJsMain/kotlin/org/jetbrains/compose/resources/ResourceReader.wasmJs.kt

3
components/resources/library/src/wasmJsMain/kotlin/org/jetbrains/compose/resources/ResourceReader.wasmJs.kt

@ -81,7 +81,8 @@ internal external fun jsExportInt8ArrayToWasm(src: Int8Array, size: Int, dstAddr
internal fun jsInt8ArrayToKotlinByteArray(x: Int8Array): ByteArray { internal fun jsInt8ArrayToKotlinByteArray(x: Int8Array): ByteArray {
val size = x.length val size = x.length
@OptIn(UnsafeWasmMemoryApi::class) return withScopedMemoryAllocator { allocator -> @OptIn(UnsafeWasmMemoryApi::class)
return withScopedMemoryAllocator { allocator ->
val memBuffer = allocator.allocate(size) val memBuffer = allocator.allocate(size)
val dstAddress = memBuffer.address.toInt() val dstAddress = memBuffer.address.toInt()
jsExportInt8ArrayToWasm(x, size, dstAddress) jsExportInt8ArrayToWasm(x, size, dstAddress)

Loading…
Cancel
Save