Shrink down getSetting() size in configurations

This commit is contained in:
JeremyStar™ 2024-07-22 15:18:35 +02:00
parent e695235277
commit 90b6dbcd31
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
2 changed files with 19 additions and 51 deletions

View file

@ -366,48 +366,22 @@ public final class EngineConfiguration implements SubsystemConfiguration {
@Nullable
public Object getSetting(@NotNull String setting) {
switch (setting) {
case "debug" -> {
return debug;
}
case "debugEvents" -> {
return debugEvents;
}
case "debugShortcodeConverter" -> {
return debugShortcodeConverter;
}
case "debug" -> { return debug; }
case "debugEvents" -> { return debugEvents; }
case "debugShortcodeConverter" -> { return debugShortcodeConverter; }
case "errorShortcodeConverter" -> {
return errorShortcodeConverter;
}
case "errorShortcodeConverter" -> { return errorShortcodeConverter; }
case "loggerLevel" -> {
return loggerLevel;
}
case "loggerTemplate" -> {
return loggerTemplate;
}
case "loggerImmediateShutdown" -> {
return loggerImmediateShutdown;
}
case "loggerForceStandardOutput" -> {
return loggerForceStandardOutput;
}
case "loggerPollingSpeed" -> {
return loggerPollingSpeed;
}
case "loggerLevel" -> { return loggerLevel; }
case "loggerTemplate" -> { return loggerTemplate; }
case "loggerImmediateShutdown" -> { return loggerImmediateShutdown; }
case "loggerForceStandardOutput" -> { return loggerForceStandardOutput; }
case "loggerPollingSpeed" -> { return loggerPollingSpeed; }
case "optimizeLogging" -> {
return optimizeLogging;
}
case "optimizeEvents" -> {
return optimizeEvents;
}
case "optimizeSubsystemInitialization" -> {
return optimizeSubsystemInitialization;
}
default -> {
return null;
}
case "optimizeLogging" -> { return optimizeLogging; }
case "optimizeEvents" -> { return optimizeEvents; }
case "optimizeSubsystemInitialization" -> { return optimizeSubsystemInitialization; }
default -> { return null; }
}
}

View file

@ -190,18 +190,12 @@ public final class GraphicsSubsystemConfiguration implements SubsystemConfigurat
@Nullable
public Object getSetting(@NotNull String setting) {
switch (setting) {
case "debug" -> {
return debug;
}
case "errorGraphicsError" -> {
return errorGraphicsError;
}
case "disallowTearing" -> {
return disallowTearing;
}
default -> {
return null;
}
case "debug" -> { return debug; }
case "errorGraphicsError" -> { return errorGraphicsError; }
case "disallowTearing" -> { return disallowTearing; }
default -> { return null; }
}
}
}