From d6c9ed46a22514d9b71f66e18cd36dc7b6ff4988 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 3 Jun 2011 16:29:13 +0000 Subject: [PATCH] make_copy should be a const method --- panda/src/gobj/texture.I | 2 +- panda/src/gobj/texture.cxx | 2 +- panda/src/gobj/texture.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/panda/src/gobj/texture.I b/panda/src/gobj/texture.I index 71ba34f17d..f530a16e6e 100644 --- a/panda/src/gobj/texture.I +++ b/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); diff --git a/panda/src/gobj/texture.cxx b/panda/src/gobj/texture.cxx index 6dee77b21a..d4714dada2 100644 --- a/panda/src/gobj/texture.cxx +++ b/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; diff --git a/panda/src/gobj/texture.h b/panda/src/gobj/texture.h index 43509047ab..94513f580a 100644 --- a/panda/src/gobj/texture.h +++ b/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 ©); virtual void do_clear(); void do_setup_texture(TextureType texture_type, int x_size, int y_size,