Browse Source

NodePaths should be returned as concretes, not references

David Rose 22 years ago
parent
commit
e6ea294429
2 changed files with 2 additions and 2 deletions
  1. 1 1
      panda/src/display/displayRegion.cxx
  2. 1 1
      panda/src/display/displayRegion.h

+ 1 - 1
panda/src/display/displayRegion.cxx

@@ -293,7 +293,7 @@ set_camera(const NodePath &camera) {
 //               DisplayRegion, or an empty NodePath if no camera is
 //               associated.
 ////////////////////////////////////////////////////////////////////
-const NodePath &DisplayRegion::
+NodePath DisplayRegion::
 get_camera() const {
   MutexHolder holder(_lock);
   return _camera;

+ 1 - 1
panda/src/display/displayRegion.h

@@ -73,7 +73,7 @@ PUBLISHED:
   GraphicsPipe *get_pipe() const;
 
   void set_camera(const NodePath &camera);
-  const NodePath &get_camera() const;
+  NodePath get_camera() const;
 
   void set_active(bool active);
   INLINE bool is_active() const;