Android: Convert AbstractIntSetting to Kotlin

This commit is contained in:
Charles Lombardo 2023-03-15 03:23:34 -04:00
parent baeeaa2a43
commit 32f9e48257
3 changed files with 11 additions and 15 deletions

View File

@ -1,12 +0,0 @@
// SPDX-License-Identifier: GPL-2.0-or-later
package org.dolphinemu.dolphinemu.features.settings.model;
import androidx.annotation.NonNull;
public interface AbstractIntSetting extends AbstractSetting
{
int getInt();
void setInt(@NonNull Settings settings, int newValue);
}

View File

@ -0,0 +1,9 @@
// SPDX-License-Identifier: GPL-2.0-or-later
package org.dolphinemu.dolphinemu.features.settings.model
interface AbstractIntSetting : AbstractSetting {
val int: Int
fun setInt(settings: Settings, newValue: Int)
}

View File

@ -16,9 +16,8 @@ class ScaledIntSetting(
return setting.delete(settings)
}
override fun getInt(): Int {
return setting.getInt() / scale
}
override val int: Int
get() = setting.int / scale
override fun setInt(settings: Settings, newValue: Int) {
return setting.setInt(settings, newValue * scale)