Skip to content

Commit

Permalink
HMPP: Avoid false positive detection of "common native" as "common"
Browse files Browse the repository at this point in the history
  • Loading branch information
ddolovov committed Apr 14, 2020
1 parent b108b0f commit 0f60b5a
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,13 @@ interface TargetPlatformVersion {
}
}

fun TargetPlatform?.isCommon(): Boolean = this != null && this.size > 1
fun TargetPlatform?.isCommon(): Boolean = this != null && size > 1 && iterator().let { i ->
val firstPlatformName = i.next().platformName
while (i.hasNext()) {
if (i.next().platformName != firstPlatformName) return@let true
}
false
}

fun SimplePlatform.toTargetPlatform(): TargetPlatform = TargetPlatform(setOf(this))

Expand Down

0 comments on commit 0f60b5a

Please sign in to comment.