style: 统一代码实现
This commit is contained in:
parent
3466c27c9e
commit
eee77ea451
@ -40,7 +40,8 @@ public class S2BCommand implements Command {
|
|||||||
@Override
|
@Override
|
||||||
public int execute(String[] parts, int currentPC, OperandStack operandStack,
|
public int execute(String[] parts, int currentPC, OperandStack operandStack,
|
||||||
LocalVariableStore localVariableStore, CallStack callStack) {
|
LocalVariableStore localVariableStore, CallStack callStack) {
|
||||||
byte convertedValue = (byte) ((short) operandStack.pop());
|
short value = (short) operandStack.pop();
|
||||||
|
byte convertedValue = (byte) value;
|
||||||
operandStack.push(convertedValue);
|
operandStack.push(convertedValue);
|
||||||
return currentPC + 1;
|
return currentPC + 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user