summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-04-02 17:37:09 +0200
committerGitHub <noreply@github.com>2020-04-02 17:37:09 +0200
commitb50387c8bf2737e7f100c6c32350d97301a6f2a3 (patch)
tree34402b0e324fc512a6cd8bd5bc85a3cc042fec30 /scene
parent6a38ce1b318cc71c285c11f5b52f04a681c309fd (diff)
parentea7b497065a615b6fd4e165b331f50613a63a329 (diff)
Merge pull request #37521 from akien-mga/more-nullptr
Replace more occurrences of NULL with nullptr
Diffstat (limited to 'scene')
-rw-r--r--scene/3d/camera_3d.cpp17
-rw-r--r--scene/animation/animation_player.cpp13
-rw-r--r--scene/gui/control.cpp6
-rw-r--r--scene/main/canvas_item.cpp1
-rw-r--r--scene/main/viewport.cpp10
5 files changed, 0 insertions, 47 deletions
diff --git a/scene/3d/camera_3d.cpp b/scene/3d/camera_3d.cpp
index 30ab4d463b..706c49b43b 100644
--- a/scene/3d/camera_3d.cpp
+++ b/scene/3d/camera_3d.cpp
@@ -413,23 +413,6 @@ Vector3 Camera3D::project_position(const Point2 &p_point, float p_z_depth) const
return get_camera_transform().xform(p);
}
-/*
-void Camera::_camera_make_current(Node *p_camera) {
-
-
- if (p_camera==this) {
- RenderingServer::get_singleton()->viewport_attach_camera(viewport_id,camera);
- active=true;
- } else {
- if (active && p_camera==NULL) {
- //detech camera because no one else will claim it
- RenderingServer::get_singleton()->viewport_attach_camera(viewport_id,RID());
- }
- active=false;
- }
-}
-*/
-
void Camera3D::set_environment(const Ref<Environment> &p_environment) {
environment = p_environment;
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 00f0dce0d6..b657833a3b 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -1242,19 +1242,6 @@ void AnimationPlayer::play(const StringName &p_name, float p_custom_blend, float
bool AnimationPlayer::is_playing() const {
return playing;
- /*
- if (playback.current.from==NULL)
- return false;
-
- float len=playback.current.from->animation->get_length();
- float pos = playback.current.pos;
- bool loop=playback.current.from->animation->has_loop();
- if (!loop && pos >= len) {
- return false;
- };
-
- return true;
- */
}
void AnimationPlayer::set_current_animation(const String &p_anim) {
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index de6233f359..775f863a4f 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -561,12 +561,6 @@ void Control::_notification(int p_notification) {
data.parent = nullptr;
data.parent_canvas_item = nullptr;
- /*
- if (data.theme_owner && data.theme.is_null()) {
- data.theme_owner=NULL;
- notification(NOTIFICATION_THEME_CHANGED);
- }
- */
} break;
case NOTIFICATION_MOVED_IN_PARENT: {
diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp
index 6fb5cbacbd..2eacad68c3 100644
--- a/scene/main/canvas_item.cpp
+++ b/scene/main/canvas_item.cpp
@@ -1469,7 +1469,6 @@ CanvasItem::CanvasItem() :
drawing = false;
behind = false;
block_transform_notify = false;
- //viewport=NULL;
canvas_layer = nullptr;
use_parent_material = false;
global_invalid = true;
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 7b860df352..5fcd4bf009 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -2506,16 +2506,6 @@ void Viewport::_gui_hid_control(Control *p_control) {
_drop_mouse_focus();
}
- /* ???
- if (data.window==p_control) {
- window->drag_data=Variant();
- if (window->drag_preview) {
- memdelete( window->drag_preview);
- window->drag_preview=NULL;
- }
- }
- */
-
if (gui.key_focus == p_control)
_gui_remove_focus();
if (gui.mouse_over == p_control)