dont use NULL macro
This commit is contained in:
parent
9d01ba2c8a
commit
e78885d452
16 changed files with 52 additions and 52 deletions
|
|
@ -50,7 +50,7 @@ ConstObject* ConstObjectsPool::registerObject(obj::Object* obj) {
|
|||
|
||||
ConstObject* ConstObjectsPool::get(tp::alni val) {
|
||||
auto idx = mIntegers.presents(val);
|
||||
ConstObject* const_obj = NULL;
|
||||
ConstObject* const_obj = nullptr;
|
||||
if (idx) {
|
||||
const_obj = mIntegers.getSlotVal(idx);
|
||||
} else {
|
||||
|
|
@ -62,7 +62,7 @@ ConstObject* ConstObjectsPool::get(tp::alni val) {
|
|||
|
||||
ConstObject* ConstObjectsPool::get(const std::string& val) {
|
||||
auto idx = mStrings.presents(val);
|
||||
ConstObject* const_obj = NULL;
|
||||
ConstObject* const_obj = nullptr;
|
||||
if (idx) {
|
||||
const_obj = mStrings.getSlotVal(idx);
|
||||
} else {
|
||||
|
|
@ -74,7 +74,7 @@ ConstObject* ConstObjectsPool::get(const std::string& val) {
|
|||
|
||||
ConstObject* ConstObjectsPool::get(tp::alnf val) {
|
||||
auto idx = mFloats.presents(val);
|
||||
ConstObject* const_obj = NULL;
|
||||
ConstObject* const_obj = nullptr;
|
||||
if (idx) {
|
||||
const_obj = mFloats.getSlotVal(idx);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -62,13 +62,13 @@ void FunctionDefinition::EvalStatement(Statement* stm) {
|
|||
|
||||
EvalExpr(stm_while->mCondition);
|
||||
|
||||
auto jump_if_inst = inst(Instruction(NULL, Instruction::InstType::JUMP_IF_NOT));
|
||||
auto jump_if_inst = inst(Instruction(nullptr, Instruction::InstType::JUMP_IF_NOT));
|
||||
|
||||
if (stm_while->mScope) {
|
||||
EvalStatement(stm_while->mScope);
|
||||
}
|
||||
|
||||
auto jump_inst = inst(Instruction(NULL, Instruction::InstType::JUMP));
|
||||
auto jump_inst = inst(Instruction(nullptr, Instruction::InstType::JUMP));
|
||||
auto end_mark = inst(Instruction());
|
||||
|
||||
jump_if_inst->data.mInstTarget = &end_mark->data;
|
||||
|
|
@ -82,13 +82,13 @@ void FunctionDefinition::EvalStatement(Statement* stm) {
|
|||
|
||||
EvalExpr(stm_if->mCondition);
|
||||
|
||||
auto jump_if_inst = inst(Instruction(NULL, Instruction::InstType::JUMP_IF_NOT));
|
||||
auto jump_if_inst = inst(Instruction(nullptr, Instruction::InstType::JUMP_IF_NOT));
|
||||
|
||||
if (stm_if->mOnTrue) {
|
||||
EvalStatement(stm_if->mOnTrue);
|
||||
}
|
||||
|
||||
auto jump_inst = inst(Instruction(NULL, Instruction::InstType::JUMP));
|
||||
auto jump_inst = inst(Instruction(nullptr, Instruction::InstType::JUMP));
|
||||
auto else_mark = inst(Instruction());
|
||||
|
||||
if (stm_if->mOnFalse) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue