Replace NULL with nullptr

This commit is contained in:
lupoDharkael 2020-04-02 01:20:12 +02:00
parent 5f11e15571
commit 95a1400a2a
755 changed files with 5742 additions and 5742 deletions

View file

@ -242,7 +242,7 @@ public:
args.write[idx] = Variant::construct(t, (const Variant **)ptrs, 1, err);
} else {
args.write[idx] = Variant::construct(t, NULL, 0, err);
args.write[idx] = Variant::construct(t, nullptr, 0, err);
}
change_notify_deserved = true;
d_new["args"] = args;
@ -693,7 +693,7 @@ public:
key_ofs = 0;
track = -1;
setting = false;
root_path = NULL;
root_path = nullptr;
}
};
@ -905,7 +905,7 @@ public:
args.write[idx] = Variant::construct(t, (const Variant **)ptrs, 1, err);
} else {
args.write[idx] = Variant::construct(t, NULL, 0, err);
args.write[idx] = Variant::construct(t, nullptr, 0, err);
}
change_notify_deserved = true;
d_new["args"] = args;
@ -1389,7 +1389,7 @@ public:
AnimationMultiTrackKeyEdit() {
use_fps = false;
setting = false;
root_path = NULL;
root_path = nullptr;
}
};
@ -1859,7 +1859,7 @@ AnimationTimelineEdit::AnimationTimelineEdit() {
use_fps = false;
editing = false;
name_limit = 150 * EDSCALE;
zoom = NULL;
zoom = nullptr;
play_position_pos = 0;
play_position = memnew(Control);
@ -1958,7 +1958,7 @@ void AnimationTrackEdit::_notification(int p_what) {
ofs += type_icon->get_width() + hsep;
NodePath path = animation->track_get_path(track);
Node *node = NULL;
Node *node = nullptr;
if (root && root->has_node(path)) {
node = root->get_node(path);
}
@ -2483,7 +2483,7 @@ bool AnimationTrackEdit::_is_value_key_valid(const Variant &p_key_value, Variant
Vector<StringName> leftover_path;
Node *node = root->get_node_and_resource(animation->track_get_path(track), res, leftover_path);
Object *obj = NULL;
Object *obj = nullptr;
if (res.is_valid()) {
obj = res.ptr();
} else if (node) {
@ -3090,12 +3090,12 @@ void AnimationTrackEdit::_bind_methods() {
}
AnimationTrackEdit::AnimationTrackEdit() {
undo_redo = NULL;
timeline = NULL;
root = NULL;
path = NULL;
path_popup = NULL;
menu = NULL;
undo_redo = nullptr;
timeline = nullptr;
root = nullptr;
path = nullptr;
path_popup = nullptr;
menu = nullptr;
clicking_on_name = false;
dropping_at = 0;
@ -3140,7 +3140,7 @@ AnimationTrackEdit *AnimationTrackEditPlugin::create_value_track_edit(Object *p_
Callable::CallError ce;
return Object::cast_to<AnimationTrackEdit>(get_script_instance()->call("create_value_track_edit", (const Variant **)&argptrs, 6, ce).operator Object *());
}
return NULL;
return nullptr;
}
AnimationTrackEdit *AnimationTrackEditPlugin::create_audio_track_edit() {
@ -3148,14 +3148,14 @@ AnimationTrackEdit *AnimationTrackEditPlugin::create_audio_track_edit() {
if (get_script_instance()) {
return Object::cast_to<AnimationTrackEdit>(get_script_instance()->call("create_audio_track_edit").operator Object *());
}
return NULL;
return nullptr;
}
AnimationTrackEdit *AnimationTrackEditPlugin::create_animation_track_edit(Object *p_object) {
if (get_script_instance()) {
return Object::cast_to<AnimationTrackEdit>(get_script_instance()->call("create_animation_track_edit", p_object).operator Object *());
}
return NULL;
return nullptr;
}
///////////////////////////////////////
@ -3304,7 +3304,7 @@ Ref<Animation> AnimationTrackEditor::get_current_animation() const {
}
void AnimationTrackEditor::_root_removed(Node *p_root) {
root = NULL;
root = nullptr;
}
void AnimationTrackEditor::set_root(Node *p_root) {
@ -3902,7 +3902,7 @@ PropertyInfo AnimationTrackEditor::_find_hint_for_track(int p_idx, NodePath &r_b
return PropertyInfo();
}
static Vector<String> _get_bezier_subindices_for_type(Variant::Type p_type, bool *r_valid = NULL) {
static Vector<String> _get_bezier_subindices_for_type(Variant::Type p_type, bool *r_valid = nullptr) {
Vector<String> subindices;
if (r_valid) {
*r_valid = true;
@ -4123,7 +4123,7 @@ void AnimationTrackEditor::_update_tracks() {
bool use_filter = selected_filter->is_pressed();
for (int i = 0; i < animation->get_track_count(); i++) {
AnimationTrackEdit *track_edit = NULL;
AnimationTrackEdit *track_edit = nullptr;
//find hint and info for plugin
@ -4184,7 +4184,7 @@ void AnimationTrackEditor::_update_tracks() {
if (animation->track_get_type(i) == Animation::TYPE_ANIMATION) {
NodePath path = animation->track_get_path(i);
Node *node = NULL;
Node *node = nullptr;
if (root && root->has_node(path)) {
node = root->get_node(path);
}
@ -4199,7 +4199,7 @@ void AnimationTrackEditor::_update_tracks() {
}
}
if (track_edit == NULL) {
if (track_edit == nullptr) {
//no valid plugin_found
track_edit = memnew(AnimationTrackEdit);
}
@ -4752,7 +4752,7 @@ void AnimationTrackEditor::_add_method_key(const String &p_method) {
params.push_back(arg);
} else {
Callable::CallError ce;
Variant arg = Variant::construct(E->get().arguments[i].type, NULL, 0, ce);
Variant arg = Variant::construct(E->get().arguments[i].type, nullptr, 0, ce);
params.push_back(arg);
}
}
@ -4838,21 +4838,21 @@ void AnimationTrackEditor::_clear_key_edit() {
if (key_edit) {
//if key edit is the object being inspected, remove it first
if (EditorNode::get_singleton()->get_inspector()->get_edited_object() == key_edit) {
EditorNode::get_singleton()->push_item(NULL);
EditorNode::get_singleton()->push_item(nullptr);
}
//then actually delete it
memdelete(key_edit);
key_edit = NULL;
key_edit = nullptr;
}
if (multi_key_edit) {
if (EditorNode::get_singleton()->get_inspector()->get_edited_object() == multi_key_edit) {
EditorNode::get_singleton()->push_item(NULL);
EditorNode::get_singleton()->push_item(nullptr);
}
memdelete(multi_key_edit);
multi_key_edit = NULL;
multi_key_edit = nullptr;
}
}
@ -5264,7 +5264,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
for (int i = 0; i < animation->get_track_count(); i++) {
NodePath path = animation->track_get_path(i);
Node *node = NULL;
Node *node = nullptr;
if (root && root->has_node(path)) {
node = root->get_node(path);
@ -5361,7 +5361,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
undo_redo->create_action(TTR("Paste Tracks"));
for (int i = 0; i < track_clipboard.size(); i++) {
undo_redo->add_do_method(animation.ptr(), "add_track", track_clipboard[i].track_type);
Node *exists = NULL;
Node *exists = nullptr;
NodePath path = track_clipboard[i].base_path;
if (root) {
@ -5607,7 +5607,7 @@ void AnimationTrackEditor::_cleanup_animation(Ref<Animation> p_animation) {
bool prop_exists = false;
Variant::Type valid_type = Variant::NIL;
Object *obj = NULL;
Object *obj = nullptr;
RES res;
Vector<StringName> leftover_path;
@ -5753,7 +5753,7 @@ void AnimationTrackEditor::_bind_methods() {
}
AnimationTrackEditor::AnimationTrackEditor() {
root = NULL;
root = nullptr;
undo_redo = EditorNode::get_singleton()->get_undo_redo();
@ -5945,8 +5945,8 @@ AnimationTrackEditor::AnimationTrackEditor() {
icvb->add_child(insert_confirm_bezier);
keying = false;
moving_selection = 0;
key_edit = NULL;
multi_key_edit = NULL;
key_edit = nullptr;
multi_key_edit = nullptr;
box_selection = memnew(Control);
add_child(box_selection);