Apply formating to all files. CLeanup
This commit is contained in:
parent
43e374f269
commit
744c01c5d0
928 changed files with 14515 additions and 21480 deletions
|
|
@ -1,32 +1,30 @@
|
|||
|
||||
#include "NewPlacement.hpp"
|
||||
|
||||
#include "interpreter/operandsstack.h"
|
||||
|
||||
using namespace obj;
|
||||
|
||||
OperandStack::OperandStack() {
|
||||
mBuff = new Operand[MAX_STACK_SIZE];
|
||||
mIdx = 0;
|
||||
}
|
||||
|
||||
void OperandStack::push(Operand operand) {
|
||||
ASSERT(MAX_STACK_SIZE - 1 > mIdx && "stack overflow");
|
||||
mBuff[mIdx] = operand;
|
||||
mIdx++;
|
||||
}
|
||||
|
||||
void OperandStack::pop() {
|
||||
ASSERT(mIdx != NULL && "stack overflow");
|
||||
mIdx--;
|
||||
}
|
||||
|
||||
Operand OperandStack::getOperand() {
|
||||
auto ret = mBuff[mIdx - 1];
|
||||
mIdx--;
|
||||
return ret;
|
||||
}
|
||||
|
||||
OperandStack::~OperandStack() {
|
||||
delete[] mBuff;
|
||||
}
|
||||
|
||||
#include "NewPlacement.hpp"
|
||||
|
||||
#include "interpreter/operandsstack.h"
|
||||
|
||||
using namespace obj;
|
||||
|
||||
OperandStack::OperandStack() {
|
||||
mBuff = new Operand[MAX_STACK_SIZE];
|
||||
mIdx = 0;
|
||||
}
|
||||
|
||||
void OperandStack::push(Operand operand) {
|
||||
ASSERT(MAX_STACK_SIZE - 1 > mIdx && "stack overflow");
|
||||
mBuff[mIdx] = operand;
|
||||
mIdx++;
|
||||
}
|
||||
|
||||
void OperandStack::pop() {
|
||||
ASSERT(mIdx != NULL && "stack overflow");
|
||||
mIdx--;
|
||||
}
|
||||
|
||||
Operand OperandStack::getOperand() {
|
||||
auto ret = mBuff[mIdx - 1];
|
||||
mIdx--;
|
||||
return ret;
|
||||
}
|
||||
|
||||
OperandStack::~OperandStack() { delete[] mBuff; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue