Skip to content

Commit

Permalink
Add back tailrec modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorbg committed Dec 17, 2023
1 parent 6def18b commit 44ce2a0
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -88,7 +88,7 @@ object FontUtil {
return lineTokens.map { it.joinToStringWithPadding(chunkGlue, padding) }
}

fun splitAtPossibleBreaks(
tailrec fun splitAtPossibleBreaks(
chunksWithBreakFlags: List<Pair<String, Boolean>>,
currentPhraseAccu: List<String> = emptyList(),
accu: List<List<String>> = emptyList()
Expand Down Expand Up @@ -120,7 +120,7 @@ object FontUtil {
}
}

fun splitToMaxFontSizeLines(
tailrec fun splitToMaxFontSizeLines(
chunkSections: List<List<String>>,
boxHeight: Float,
boxWidth: Float,
Expand Down Expand Up @@ -166,7 +166,7 @@ object FontUtil {
return accu.toMutableList().apply { add(element) }
}

private fun splitChunksToLines(
private tailrec fun splitChunksToLines(
chunks: List<List<String>>,
lineRelWidth: Float,
chunkGlue: String,
Expand All @@ -189,7 +189,7 @@ object FontUtil {
}
}

private fun takeChunksThatFitOneLine(
private tailrec fun takeChunksThatFitOneLine(
chunkSections: List<List<String>>,
lineRelativeWidth: Float,
chunkGlue: String,
Expand Down

0 comments on commit 44ce2a0

Please sign in to comment.