dont use NULL macro
This commit is contained in:
parent
9d01ba2c8a
commit
e78885d452
16 changed files with 52 additions and 52 deletions
|
|
@ -5,7 +5,7 @@
|
|||
using namespace obj;
|
||||
using namespace tp;
|
||||
|
||||
obj::NullObject* obj::NdoNull_globalInstance = NULL;
|
||||
obj::NullObject* obj::NdoNull_globalInstance = nullptr;
|
||||
bool uninit_flag = false;
|
||||
|
||||
void NullObject::uninit() {
|
||||
|
|
@ -16,7 +16,7 @@ void NullObject::uninit() {
|
|||
|
||||
void NullObject::destructor(Object* self) { DEBUG_ASSERT(uninit_flag && "Only one the instance of NullObject exists and thus it can't be destroyed"); }
|
||||
|
||||
std::string to_string(NullObject* self) { return "NULL"; }
|
||||
std::string to_string(NullObject* self) { return "nullptr"; }
|
||||
|
||||
alni to_int(NullObject* self) { return 0; }
|
||||
|
||||
|
|
@ -29,19 +29,19 @@ obj::TypeMethods* tm_construct() {
|
|||
}
|
||||
|
||||
struct ObjectTypeConversions NullObjectTypeConversions = {
|
||||
.from_int = NULL,
|
||||
.from_float = NULL,
|
||||
.from_string = NULL,
|
||||
.from_int = nullptr,
|
||||
.from_float = nullptr,
|
||||
.from_string = nullptr,
|
||||
.to_string = (object_to_string) to_string,
|
||||
.to_int = (object_to_int) to_int,
|
||||
.to_float = (object_to_float) to_float,
|
||||
};
|
||||
|
||||
struct ObjectType NullObject::TypeData = {
|
||||
.base = NULL,
|
||||
.constructor = NULL,
|
||||
.base = nullptr,
|
||||
.constructor = nullptr,
|
||||
.destructor = NullObject::destructor,
|
||||
.copy = NULL,
|
||||
.copy = nullptr,
|
||||
.size = sizeof(NullObject),
|
||||
.name = "null",
|
||||
.convesions = &NullObjectTypeConversions,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue