replacing min/max usage with kotlin's

This commit is contained in:
minjaesong
2023-07-11 01:54:46 +09:00
parent d96b7d1b84
commit 79f19120f2
66 changed files with 308 additions and 345 deletions

View File

@@ -15,6 +15,7 @@ import java.util.logging.Level
import javax.swing.*
import javax.swing.table.AbstractTableModel
import javax.swing.text.DefaultCaret
import kotlin.math.min
/**
@@ -619,7 +620,7 @@ EntryID: ${file.entryID}
ParentID: ${file.parentEntryID}""" + if (file.contents is EntryFile) """
Contents:
${String(file.contents.bytes.sliceArray64(0L..minOf(PREVIEW_MAX_BYTES, file.contents.bytes.size) - 1).toByteArray(), sysCharset)}""" else ""
${String(file.contents.bytes.sliceArray64(0L..min(PREVIEW_MAX_BYTES, file.contents.bytes.size) - 1).toByteArray(), sysCharset)}""" else ""
}
private fun setWindowTitleWithName(name: String) {
this.title = "$appName - $name"