style: 统一代码实现

This commit is contained in:
zhangxun 2025-06-28 21:08:49 +08:00
parent 3466c27c9e
commit eee77ea451

View File

@ -40,7 +40,8 @@ public class S2BCommand implements Command {
@Override
public int execute(String[] parts, int currentPC, OperandStack operandStack,
LocalVariableStore localVariableStore, CallStack callStack) {
byte convertedValue = (byte) ((short) operandStack.pop());
short value = (short) operandStack.pop();
byte convertedValue = (byte) value;
operandStack.push(convertedValue);
return currentPC + 1;
}