Skip to content

Commit

Permalink
Remove warning about unused i in Java. This fixes kaitai-io/kaitai_st…
Browse files Browse the repository at this point in the history
…ruct#365 in a somewhat easy manner and can be improved in future if needed at all.
  • Loading branch information
tschoening authored and ams-tschoening committed Mar 30, 2018
1 parent dcf2fd2 commit f267eb8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ class JavaCompiler(typeProvider: ClassTypeProvider, config: RuntimeConfig)
}

override def condRepeatEosFooter: Unit = {
out.puts("i++;")
out.puts("i = i + 1;")
out.dec
out.puts("}")
out.dec
Expand Down Expand Up @@ -409,7 +409,7 @@ class JavaCompiler(typeProvider: ClassTypeProvider, config: RuntimeConfig)

override def condRepeatUntilFooter(id: Identifier, io: String, dataType: DataType, needRaw: Boolean, untilExpr: expr): Unit = {
typeProvider._currentIteratorType = Some(dataType)
out.puts("i++;")
out.puts("i = i + 1;")
out.dec
out.puts(s"} while (!(${expression(untilExpr)}));")
out.dec
Expand Down

0 comments on commit f267eb8

Please sign in to comment.