From bd494a8384ef3e46d6a9e5035c6cac750edcd270 Mon Sep 17 00:00:00 2001 From: Ilya Ryzhenkov Date: Thu, 21 Aug 2014 19:53:36 +0400 Subject: LinkedHashMap is now default for groupBy in stdlib. --- src/Generation/FileGenerator.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Generation') diff --git a/src/Generation/FileGenerator.kt b/src/Generation/FileGenerator.kt index 5221c400..3e410d39 100644 --- a/src/Generation/FileGenerator.kt +++ b/src/Generation/FileGenerator.kt @@ -12,7 +12,7 @@ public class FileGenerator(val signatureGenerator: LanguageService, public fun buildOutline(node: DocumentationNode): Unit = buildOutlines(listOf(node)) public fun buildPages(nodes: Iterable) { - for ((location, items) in nodes.groupByTo(LinkedHashMap()) { locationService.location(it) }) { + for ((location, items) in nodes.groupBy { locationService.location(it) }) { val file = location.file.appendExtension(formatService.extension) file.getParentFile()?.mkdirs() FileOutputStream(file).use { @@ -25,7 +25,7 @@ public class FileGenerator(val signatureGenerator: LanguageService, } public fun buildOutlines(nodes: Iterable) { - for ((location, items) in nodes.groupByTo(LinkedHashMap()) { locationService.location(it) }) { + for ((location, items) in nodes.groupBy { locationService.location(it) }) { val file = location.file.appendExtension("yml") // TODO: hardcoded file.getParentFile()?.mkdirs() FileOutputStream(file).use { -- cgit