forked from StarOpenSource/Engine
Shrink down getSetting() size in configurations
This commit is contained in:
parent
e695235277
commit
90b6dbcd31
2 changed files with 19 additions and 51 deletions
|
@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue