From cc73c7e009e2659b1aef790cc277c8d128fedce4 Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Wed, 19 Apr 2017 14:16:13 +0300 Subject: [PATCH] Reduce amount of redundant empty lines in C interop stubs --- .../kotlin/native/interop/gen/jvm/StubGenerator.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt b/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt index 56066ce2f78..578e130e389 100644 --- a/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt +++ b/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt @@ -1388,10 +1388,13 @@ class StubGenerator( out("") stubs.forEach { - it.nativeStubLines.forEach { - out(it) + val lines = it.nativeStubLines + if (lines.isNotEmpty()) { + lines.forEach { + out(it) + } + out("") } - out("") } if (entryPoint != null) {