Skip to content

Commit 67f2a19

Browse files
committed
Lintfix
1 parent 01304ad commit 67f2a19

File tree

3 files changed

+4
-7
lines changed
  • tiny-cli/src/jvmMain/kotlin/com/github/minigdx/tiny/cli/command
  • tiny-engine/src

3 files changed

+4
-7
lines changed

tiny-cli/src/jvmMain/kotlin/com/github/minigdx/tiny/cli/command/RunCommand.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class RunCommand : CliktCommand(name = "run", help = "Run your game.") {
6464
)
6565

6666
val data = File("data")
67-
if(data.exists() && data.isDirectory) {
67+
if (data.exists() && data.isDirectory) {
6868
WorkspaceLib.DEFAULT = data.listFiles().map { JvmLocalFile(it.name, data) }
6969
}
7070
gameEngine.main()

tiny-engine/src/commonMain/kotlin/com/github/minigdx/tiny/lua/DebugLib.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,6 @@ class DebugLib(private val resourceAccess: GameResourceAccess) : TwoArgFunction(
209209

210210
private val recursiveSecurity = mutableSetOf<Int>()
211211

212-
213-
214-
215212
@TinyCall("Log a message into the console.")
216213
override fun call(@TinyArg("str") arg: LuaValue): LuaValue {
217214
val str = formatValue(arg)
@@ -222,8 +219,8 @@ class DebugLib(private val resourceAccess: GameResourceAccess) : TwoArgFunction(
222219

223220
private fun formatValue(arg: LuaValue): String = if (arg.istable()) {
224221
val table = arg as LuaTable
225-
if(recursiveSecurity.contains(table.hashCode())) {
226-
"table[<${table.hashCode()}>]"
222+
if (recursiveSecurity.contains(table.hashCode())) {
223+
"table[<${table.hashCode()}>]"
227224
} else {
228225
recursiveSecurity.add(table.hashCode())
229226
val keys = table.keys()

tiny-engine/src/jvmMain/kotlin/com/github/minigdx/tiny/file/JvmLocalFile.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class JvmLocalFile(
2222
}
2323

2424
override fun save(content: ByteArray) {
25-
if(!workingDirectory.exists()) {
25+
if (!workingDirectory.exists()) {
2626
workingDirectory.mkdirs()
2727
}
2828
workingDirectory.resolve(file).writeBytes(content)

0 commit comments

Comments
 (0)