You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Replace NULL with nullptr
This commit is contained in:
@@ -46,12 +46,12 @@
|
||||
void AnimationPlayerEditor::_node_removed(Node *p_node) {
|
||||
|
||||
if (player && player == p_node) {
|
||||
player = NULL;
|
||||
player = nullptr;
|
||||
|
||||
set_process(false);
|
||||
|
||||
track_editor->set_animation(Ref<Animation>());
|
||||
track_editor->set_root(NULL);
|
||||
track_editor->set_root(nullptr);
|
||||
track_editor->show_select_node_warning(true);
|
||||
_update_player();
|
||||
}
|
||||
@@ -299,7 +299,7 @@ void AnimationPlayerEditor::_animation_selected(int p_which) {
|
||||
|
||||
} else {
|
||||
track_editor->set_animation(Ref<Animation>());
|
||||
track_editor->set_root(NULL);
|
||||
track_editor->set_root(nullptr);
|
||||
}
|
||||
|
||||
autoplay->set_pressed(current == player->get_autoplay());
|
||||
@@ -407,7 +407,7 @@ void AnimationPlayerEditor::_animation_save_as(const Ref<Resource> &p_resource)
|
||||
file->set_current_path(p_resource->get_path());
|
||||
if (extensions.size()) {
|
||||
String ext = p_resource->get_path().get_extension().to_lower();
|
||||
if (extensions.find(ext) == NULL) {
|
||||
if (extensions.find(ext) == nullptr) {
|
||||
file->set_current_path(p_resource->get_path().replacen("." + ext, "." + extensions.front()->get()));
|
||||
}
|
||||
}
|
||||
@@ -729,7 +729,7 @@ void AnimationPlayerEditor::_animation_edit() {
|
||||
}
|
||||
} else {
|
||||
track_editor->set_animation(Ref<Animation>());
|
||||
track_editor->set_root(NULL);
|
||||
track_editor->set_root(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -845,10 +845,10 @@ void AnimationPlayerEditor::_update_player() {
|
||||
frame->set_editable(animlist.size() != 0);
|
||||
animation->set_disabled(animlist.size() == 0);
|
||||
autoplay->set_disabled(animlist.size() == 0);
|
||||
tool_anim->set_disabled(player == NULL);
|
||||
tool_anim->set_disabled(player == nullptr);
|
||||
onion_toggle->set_disabled(animlist.size() == 0);
|
||||
onion_skinning->set_disabled(animlist.size() == 0);
|
||||
pin->set_disabled(player == NULL);
|
||||
pin->set_disabled(player == nullptr);
|
||||
|
||||
if (!player) {
|
||||
AnimationPlayerEditor::singleton->get_track_editor()->update_keying();
|
||||
@@ -1549,7 +1549,7 @@ void AnimationPlayerEditor::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("_stop_onion_skinning"), &AnimationPlayerEditor::_stop_onion_skinning);
|
||||
}
|
||||
|
||||
AnimationPlayerEditor *AnimationPlayerEditor::singleton = NULL;
|
||||
AnimationPlayerEditor *AnimationPlayerEditor::singleton = nullptr;
|
||||
|
||||
AnimationPlayer *AnimationPlayerEditor::get_player() const {
|
||||
|
||||
@@ -1565,7 +1565,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
|
||||
|
||||
set_focus_mode(FOCUS_ALL);
|
||||
|
||||
player = NULL;
|
||||
player = nullptr;
|
||||
|
||||
HBoxContainer *hb = memnew(HBoxContainer);
|
||||
add_child(hb);
|
||||
|
||||
Reference in New Issue
Block a user