NULL -> nullptr
This commit is contained in:
@@ -41,8 +41,8 @@ public:
|
||||
AABB merge(const AABB& p_with) const;
|
||||
void merge_with(const AABB& p_aabb); ///merge with another AABB
|
||||
AABB intersection(const AABB& p_aabb) const; ///get box where two intersect, empty if no intersection occurs
|
||||
bool intersects_segment(const Vector3& p_from, const Vector3& p_to,Vector3* r_clip=NULL,Vector3* r_normal=NULL) const;
|
||||
bool intersects_ray(const Vector3& p_from, const Vector3& p_dir,Vector3* r_clip=NULL,Vector3* r_normal=NULL) const;
|
||||
bool intersects_segment(const Vector3& p_from, const Vector3& p_to,Vector3* r_clip=nullptr,Vector3* r_normal=nullptr) const;
|
||||
bool intersects_ray(const Vector3& p_from, const Vector3& p_dir,Vector3* r_clip=nullptr,Vector3* r_normal=nullptr) const;
|
||||
bool smits_intersect_ray(const Vector3 &from,const Vector3& p_dir, real_t t0, real_t t1) const;
|
||||
|
||||
bool intersects_convex_shape(const Plane *p_plane, int p_plane_count) const;
|
||||
|
||||
@@ -454,7 +454,7 @@ void register_signal(String name, Dictionary args = Dictionary())
|
||||
signal.num_args = args.size();
|
||||
signal.num_default_args = 0;
|
||||
|
||||
// Need to check because malloc(0) is platform-dependent. Zero arguments will leave args to NULL.
|
||||
// Need to check because malloc(0) is platform-dependent. Zero arguments will leave args to nullptr.
|
||||
if(signal.num_args != 0) {
|
||||
signal.args = (godot_signal_argument*) godot::api->godot_alloc(sizeof(godot_signal_argument) * signal.num_args);
|
||||
memset((void *) signal.args, 0, sizeof(godot_signal_argument) * signal.num_args);
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
godot_pool_byte_array_read_access *_read_access;
|
||||
public:
|
||||
inline Read() {
|
||||
_read_access = NULL;
|
||||
_read_access = nullptr;
|
||||
}
|
||||
|
||||
inline Read(const Read & p_other) {
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
godot_pool_byte_array_write_access *_write_access;
|
||||
public:
|
||||
inline Write() {
|
||||
_write_access = NULL;
|
||||
_write_access = nullptr;
|
||||
}
|
||||
|
||||
inline Write(const Write & p_other) {
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
godot_pool_int_array_read_access *_read_access;
|
||||
public:
|
||||
inline Read() {
|
||||
_read_access = NULL;
|
||||
_read_access = nullptr;
|
||||
}
|
||||
|
||||
inline Read(const Read & p_other) {
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
godot_pool_int_array_write_access *_write_access;
|
||||
public:
|
||||
inline Write() {
|
||||
_write_access = NULL;
|
||||
_write_access = nullptr;
|
||||
}
|
||||
|
||||
inline Write(const Write & p_other) {
|
||||
@@ -217,7 +217,7 @@ public:
|
||||
godot_pool_real_array_read_access *_read_access;
|
||||
public:
|
||||
inline Read() {
|
||||
_read_access = NULL;
|
||||
_read_access = nullptr;
|
||||
}
|
||||
|
||||
inline Read(const Read & p_other) {
|
||||
@@ -246,7 +246,7 @@ public:
|
||||
godot_pool_real_array_write_access *_write_access;
|
||||
public:
|
||||
inline Write() {
|
||||
_write_access = NULL;
|
||||
_write_access = nullptr;
|
||||
}
|
||||
|
||||
inline Write(const Write & p_other) {
|
||||
@@ -313,7 +313,7 @@ public:
|
||||
godot_pool_string_array_read_access *_read_access;
|
||||
public:
|
||||
inline Read() {
|
||||
_read_access = NULL;
|
||||
_read_access = nullptr;
|
||||
}
|
||||
|
||||
inline Read(const Read & p_other) {
|
||||
@@ -342,7 +342,7 @@ public:
|
||||
godot_pool_string_array_write_access *_write_access;
|
||||
public:
|
||||
inline Write() {
|
||||
_write_access = NULL;
|
||||
_write_access = nullptr;
|
||||
}
|
||||
|
||||
inline Write(const Write & p_other) {
|
||||
@@ -410,7 +410,7 @@ public:
|
||||
godot_pool_vector2_array_read_access *_read_access;
|
||||
public:
|
||||
inline Read() {
|
||||
_read_access = NULL;
|
||||
_read_access = nullptr;
|
||||
}
|
||||
|
||||
inline Read(const Read & p_other) {
|
||||
@@ -439,7 +439,7 @@ public:
|
||||
godot_pool_vector2_array_write_access *_write_access;
|
||||
public:
|
||||
inline Write() {
|
||||
_write_access = NULL;
|
||||
_write_access = nullptr;
|
||||
}
|
||||
|
||||
inline Write(const Write & p_other) {
|
||||
@@ -506,7 +506,7 @@ public:
|
||||
godot_pool_vector3_array_read_access *_read_access;
|
||||
public:
|
||||
inline Read() {
|
||||
_read_access = NULL;
|
||||
_read_access = nullptr;
|
||||
}
|
||||
|
||||
inline Read(const Read & p_other) {
|
||||
@@ -535,7 +535,7 @@ public:
|
||||
godot_pool_vector3_array_write_access *_write_access;
|
||||
public:
|
||||
inline Write() {
|
||||
_write_access = NULL;
|
||||
_write_access = nullptr;
|
||||
}
|
||||
|
||||
inline Write(const Write & p_other) {
|
||||
@@ -602,7 +602,7 @@ public:
|
||||
godot_pool_color_array_read_access *_read_access;
|
||||
public:
|
||||
inline Read() {
|
||||
_read_access = NULL;
|
||||
_read_access = nullptr;
|
||||
}
|
||||
|
||||
inline Read(const Read & p_other) {
|
||||
@@ -631,7 +631,7 @@ public:
|
||||
godot_pool_color_array_write_access *_write_access;
|
||||
public:
|
||||
inline Write() {
|
||||
_write_access = NULL;
|
||||
_write_access = nullptr;
|
||||
}
|
||||
|
||||
inline Write(const Write & p_other) {
|
||||
|
||||
@@ -45,7 +45,7 @@ struct Rect2 {
|
||||
|
||||
bool intersects_transformed(const Transform2D& p_xform, const Rect2& p_rect) const;
|
||||
|
||||
bool intersects_segment(const Point2& p_from, const Point2& p_to, Point2* r_pos=NULL, Point2* r_normal=NULL) const;
|
||||
bool intersects_segment(const Point2& p_from, const Point2& p_to, Point2* r_pos=nullptr, Point2* r_normal=nullptr) const;
|
||||
|
||||
inline bool encloses(const Rect2& p_rect) const {
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class Object;
|
||||
template <class T>
|
||||
class Ref {
|
||||
|
||||
T *reference = NULL;
|
||||
T *reference = nullptr;
|
||||
|
||||
void ref(const Ref &p_from) {
|
||||
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
//r.reference = Object::cast_to<T>(refb);
|
||||
r.reference = (T*)refb;
|
||||
ref(r);
|
||||
r.reference = NULL;
|
||||
r.reference = nullptr;
|
||||
}
|
||||
|
||||
void operator=(const Variant &p_variant) {
|
||||
@@ -118,19 +118,19 @@ public:
|
||||
//r.reference = Object::cast_to<T>(refb);
|
||||
r.reference = (T *)refb;
|
||||
ref(r);
|
||||
r.reference = NULL;
|
||||
r.reference = nullptr;
|
||||
}
|
||||
|
||||
Ref(const Ref &p_from) {
|
||||
|
||||
reference = NULL;
|
||||
reference = nullptr;
|
||||
ref(p_from);
|
||||
}
|
||||
|
||||
template <class T_Other>
|
||||
Ref(const Ref<T_Other> &p_from) {
|
||||
|
||||
reference = NULL;
|
||||
reference = nullptr;
|
||||
// TODO We need a safe cast
|
||||
Reference *refb = const_cast<Reference *>(static_cast<const Reference *>(p_from.ptr()));
|
||||
if (!refb) {
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
//r.reference = Object::cast_to<T>(refb);
|
||||
r.reference = (T *)refb;
|
||||
ref(r);
|
||||
r.reference = NULL;
|
||||
r.reference = nullptr;
|
||||
}
|
||||
|
||||
Ref(T *p_reference) {
|
||||
@@ -150,12 +150,12 @@ public:
|
||||
if (p_reference)
|
||||
ref_pointer(p_reference);
|
||||
else
|
||||
reference = NULL;
|
||||
reference = nullptr;
|
||||
}
|
||||
|
||||
Ref(const Variant &p_variant) {
|
||||
|
||||
reference = NULL;
|
||||
reference = nullptr;
|
||||
// TODO We need a safe cast
|
||||
Reference *refb = (Reference *) (Object *) p_variant;
|
||||
if (!refb) {
|
||||
@@ -167,11 +167,11 @@ public:
|
||||
//r.reference = Object::cast_to<T>(refb);
|
||||
r.reference = (T *)refb;
|
||||
ref(r);
|
||||
r.reference = NULL;
|
||||
r.reference = nullptr;
|
||||
}
|
||||
|
||||
inline bool is_valid() const { return reference != NULL; }
|
||||
inline bool is_null() const { return reference == NULL; }
|
||||
inline bool is_valid() const { return reference != nullptr; }
|
||||
inline bool is_null() const { return reference == nullptr; }
|
||||
|
||||
void unref() {
|
||||
//TODO this should be moved to mutexes, since this engine does not really
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
//memdelete(reference);
|
||||
delete reference;
|
||||
}
|
||||
reference = NULL;
|
||||
reference = nullptr;
|
||||
}
|
||||
|
||||
void instance() {
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
|
||||
Ref() {
|
||||
|
||||
reference = NULL;
|
||||
reference = nullptr;
|
||||
}
|
||||
|
||||
~Ref() {
|
||||
|
||||
Reference in New Issue
Block a user