Browse Source

make_copy should be a const method

rdb 14 years ago
parent
commit
d6c9ed46a2
3 changed files with 4 additions and 4 deletions
  1. 1 1
      panda/src/gobj/texture.I
  2. 1 1
      panda/src/gobj/texture.cxx
  3. 2 2
      panda/src/gobj/texture.h

+ 1 - 1
panda/src/gobj/texture.I

@@ -28,7 +28,7 @@
 //               original.
 ////////////////////////////////////////////////////////////////////
 INLINE PT(Texture) Texture::
-make_copy() {
+make_copy() const {
   MutexHolder holder(_lock);
   PT(Texture) tex = do_make_copy();
   ++(tex->_properties_modified);

+ 1 - 1
panda/src/gobj/texture.cxx

@@ -4442,7 +4442,7 @@ do_rescale_texture() {
 //  Description:
 ////////////////////////////////////////////////////////////////////
 PT(Texture) Texture::
-do_make_copy() {
+do_make_copy() const {
   PT(Texture) tex = new Texture(get_name());
   tex->do_assign(*this);
   return tex;

+ 2 - 2
panda/src/gobj/texture.h

@@ -202,7 +202,7 @@ protected:
 PUBLISHED:
   virtual ~Texture();
 
-  INLINE PT(Texture) make_copy();
+  INLINE PT(Texture) make_copy() const;
   INLINE void clear();
 
   INLINE void setup_texture(TextureType texture_type,
@@ -542,7 +542,7 @@ protected:
                                       const LoaderOptions &options);
   bool do_rescale_texture();
 
-  virtual PT(Texture) do_make_copy();
+  virtual PT(Texture) do_make_copy() const;
   void do_assign(const Texture &copy);
   virtual void do_clear();
   void do_setup_texture(TextureType texture_type, int x_size, int y_size,