projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d07c43
)
Added reset() and empty constructor to SDLSurfacePtr
author
Ingo Ruhnke
<grumbel@gmx.de>
Mon, 7 Dec 2009 18:01:55 +0000
(18:01 +0000)
committer
Ingo Ruhnke
<grumbel@gmx.de>
Mon, 7 Dec 2009 18:01:55 +0000
(18:01 +0000)
SVN-Revision: 6195
src/video/sdl_surface_ptr.hpp
patch
|
blob
|
history
diff --git
a/src/video/sdl_surface_ptr.hpp
b/src/video/sdl_surface_ptr.hpp
index
4311e70
..
c58d873
100644
(file)
--- a/
src/video/sdl_surface_ptr.hpp
+++ b/
src/video/sdl_surface_ptr.hpp
@@
-27,6
+27,10
@@
private:
SDL_Surface* m_surface;
public:
+ SDLSurfacePtr() :
+ m_surface(0)
+ {}
+
SDLSurfacePtr(SDL_Surface* surface) :
m_surface(surface)
{}
@@
-41,6
+45,12
@@
public:
return m_surface;
}
+ void reset(SDL_Surface* surface)
+ {
+ SDL_FreeSurface(m_surface);
+ m_surface = surface;
+ }
+
SDL_Surface* get()
{
return m_surface;