Skip to content

Commit

Permalink
Moved the initial initialization to the init block
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulWoitaschek committed Jul 19, 2017
1 parent e168d43 commit 9ffaa94
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ import java.io.File

object ReadAsMatroskaChapters {

fun read(file: File): List<MatroskaChapter> {
init {
// Reference MatroskaDocTypes to force static init of its members which
// register in static map used when identifying EBML Element types.
MatroskaDocTypes.Void.level
}

fun read(file: File): List<MatroskaChapter> {
val dataSource = FileDataSource(file.path)
val reader = EBMLReader(dataSource)

Expand Down

0 comments on commit 9ffaa94

Please sign in to comment.