Browse Source

should return concrete NodePaths, not const refs

David Rose 18 years ago
parent
commit
0cd1b7a065
2 changed files with 10 additions and 10 deletions
  1. 5 5
      panda/src/framework/windowFramework.cxx
  2. 5 5
      panda/src/framework/windowFramework.h

+ 5 - 5
panda/src/framework/windowFramework.cxx

@@ -237,7 +237,7 @@ close_window() {
 //               in the scene graph.  This node may be moved around to
 //               in the scene graph.  This node may be moved around to
 //               represent the viewpoint.
 //               represent the viewpoint.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-const NodePath &WindowFramework::
+NodePath WindowFramework::
 get_camera_group() {
 get_camera_group() {
   if (_camera_group.is_empty()) {
   if (_camera_group.is_empty()) {
     _camera_group = get_render().attach_new_node("camera_group");
     _camera_group = get_render().attach_new_node("camera_group");
@@ -250,7 +250,7 @@ get_camera_group() {
 //       Access: Public
 //       Access: Public
 //  Description: Returns the root of the 3-d scene graph.
 //  Description: Returns the root of the 3-d scene graph.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-const NodePath &WindowFramework::
+NodePath WindowFramework::
 get_render() {
 get_render() {
   if (_render.is_empty()) {
   if (_render.is_empty()) {
     _render = NodePath("render");
     _render = NodePath("render");
@@ -269,7 +269,7 @@ get_render() {
 //       Access: Public
 //       Access: Public
 //  Description: Returns the root of the 2-d scene graph.
 //  Description: Returns the root of the 2-d scene graph.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-const NodePath &WindowFramework::
+NodePath WindowFramework::
 get_render_2d() {
 get_render_2d() {
   if (_render_2d.is_empty()) {
   if (_render_2d.is_empty()) {
     _render_2d = NodePath("render_2d");
     _render_2d = NodePath("render_2d");
@@ -317,7 +317,7 @@ get_render_2d() {
 //  Description: Returns the node under the 2-d scene graph that is
 //  Description: Returns the node under the 2-d scene graph that is
 //               scaled to suit the window's aspect ratio.
 //               scaled to suit the window's aspect ratio.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-const NodePath &WindowFramework::
+NodePath WindowFramework::
 get_aspect_2d() {
 get_aspect_2d() {
   if (_aspect_2d.is_empty()) {
   if (_aspect_2d.is_empty()) {
     PGTop *top = new PGTop("aspect_2d");
     PGTop *top = new PGTop("aspect_2d");
@@ -357,7 +357,7 @@ get_aspect_2d() {
 //  Description: Returns the node in the data graph corresponding to
 //  Description: Returns the node in the data graph corresponding to
 //               the mouse associated with this window.
 //               the mouse associated with this window.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
-const NodePath &WindowFramework::
+NodePath WindowFramework::
 get_mouse() {
 get_mouse() {
   if (_mouse.is_empty()) {
   if (_mouse.is_empty()) {
     NodePath mouse = _panda_framework->get_mouse(_window);
     NodePath mouse = _panda_framework->get_mouse(_window);

+ 5 - 5
panda/src/framework/windowFramework.h

@@ -71,15 +71,15 @@ protected:
 public:
 public:
   INLINE PandaFramework *get_panda_framework() const;
   INLINE PandaFramework *get_panda_framework() const;
   INLINE GraphicsWindow *get_graphics_window() const;
   INLINE GraphicsWindow *get_graphics_window() const;
-  const NodePath &get_camera_group();
+  NodePath get_camera_group();
 
 
   INLINE int get_num_cameras() const;
   INLINE int get_num_cameras() const;
   INLINE Camera *get_camera(int n) 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 enable_keyboard();
   void setup_trackball();
   void setup_trackball();