From 0cd1b7a065188f339f2c287baf406253f3629152 Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 14 Dec 2007 19:40:55 +0000 Subject: [PATCH] should return concrete NodePaths, not const refs --- panda/src/framework/windowFramework.cxx | 10 +++++----- panda/src/framework/windowFramework.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/panda/src/framework/windowFramework.cxx b/panda/src/framework/windowFramework.cxx index 63fe2d20d8..48c1cf35c9 100644 --- a/panda/src/framework/windowFramework.cxx +++ b/panda/src/framework/windowFramework.cxx @@ -237,7 +237,7 @@ close_window() { // in the scene graph. This node may be moved around to // represent the viewpoint. //////////////////////////////////////////////////////////////////// -const NodePath &WindowFramework:: +NodePath WindowFramework:: get_camera_group() { if (_camera_group.is_empty()) { _camera_group = get_render().attach_new_node("camera_group"); @@ -250,7 +250,7 @@ get_camera_group() { // Access: Public // Description: Returns the root of the 3-d scene graph. //////////////////////////////////////////////////////////////////// -const NodePath &WindowFramework:: +NodePath WindowFramework:: get_render() { if (_render.is_empty()) { _render = NodePath("render"); @@ -269,7 +269,7 @@ get_render() { // Access: Public // Description: Returns the root of the 2-d scene graph. //////////////////////////////////////////////////////////////////// -const NodePath &WindowFramework:: +NodePath WindowFramework:: get_render_2d() { if (_render_2d.is_empty()) { _render_2d = NodePath("render_2d"); @@ -317,7 +317,7 @@ get_render_2d() { // Description: Returns the node under the 2-d scene graph that is // scaled to suit the window's aspect ratio. //////////////////////////////////////////////////////////////////// -const NodePath &WindowFramework:: +NodePath WindowFramework:: get_aspect_2d() { if (_aspect_2d.is_empty()) { PGTop *top = new PGTop("aspect_2d"); @@ -357,7 +357,7 @@ get_aspect_2d() { // Description: Returns the node in the data graph corresponding to // the mouse associated with this window. //////////////////////////////////////////////////////////////////// -const NodePath &WindowFramework:: +NodePath WindowFramework:: get_mouse() { if (_mouse.is_empty()) { NodePath mouse = _panda_framework->get_mouse(_window); diff --git a/panda/src/framework/windowFramework.h b/panda/src/framework/windowFramework.h index 06a59f84d8..2baa09e4d0 100644 --- a/panda/src/framework/windowFramework.h +++ b/panda/src/framework/windowFramework.h @@ -71,15 +71,15 @@ protected: public: INLINE PandaFramework *get_panda_framework() const; INLINE GraphicsWindow *get_graphics_window() const; - const NodePath &get_camera_group(); + NodePath get_camera_group(); INLINE int get_num_cameras() const; INLINE Camera *get_camera(int n) const; - const NodePath &get_render(); - const NodePath &get_render_2d(); - const NodePath &get_aspect_2d(); - const NodePath &get_mouse(); + NodePath get_render(); + NodePath get_render_2d(); + NodePath get_aspect_2d(); + NodePath get_mouse(); void enable_keyboard(); void setup_trackball();