Skip to content

Commit

Permalink
0xb0cdBin: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
handymenny committed Jul 29, 2024
1 parent bdf5c32 commit d4bedfc
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ object Import0xB0CDBin : ImportCapabilities {

listCombo = mutableListWithCapacity(numCombos)

for (i in 1..numCombos) {
repeat(numCombos) {
val combo = parseCombo(stream, version)
listCombo.add(combo)
}
Expand Down Expand Up @@ -95,7 +95,7 @@ object Import0xB0CDBin : ImportCapabilities {
private fun parseCombo(stream: InputStream, version: Int): ComboLte {
val numComponents = getNumComponents(stream, version)
val bands = mutableListWithCapacity<ComponentLte>(numComponents)
for (i in 0 until numComponents) {
repeat(numComponents) {
val component = parseComponent(stream, version)
if (component.band != 0) {
bands.add(component)
Expand Down Expand Up @@ -164,7 +164,7 @@ object Import0xB0CDBin : ImportCapabilities {
*
* The sequence generator is guessed, so it can be wrong or incomplete.
*/
fun getQamFromIndex(index: Int): Modulation {
private fun getQamFromIndex(index: Int): Modulation {
/*
Some examples:
0 -> INVALID
Expand All @@ -180,7 +180,7 @@ object Import0xB0CDBin : ImportCapabilities {
...
*/
var result = arrayOf(ModulationOrder.NONE)
for (i in 1..index) {
repeat(index) {
val indexOfMin = result.indexOfMin()
when (result[indexOfMin]) {
ModulationOrder.QAM256 -> result = Array(result.size + 1) { ModulationOrder.QAM64 }
Expand Down

0 comments on commit d4bedfc

Please sign in to comment.