projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f7b6d5b
)
Replaced boost::shared_ptr<> with std::shared_ptr<>
author
Ingo Ruhnke
<grumbel@gmail.com>
Sun, 31 Aug 2014 05:42:49 +0000
(07:42 +0200)
committer
Ingo Ruhnke
<grumbel@gmail.com>
Sun, 31 Aug 2014 05:54:31 +0000
(07:54 +0200)
src/object/coin.cpp
patch
|
blob
|
history
src/object/coin.hpp
patch
|
blob
|
history
src/object/tilemap.hpp
patch
|
blob
|
history
src/sprite/sprite_ptr.hpp
patch
|
blob
|
history
src/video/font_ptr.hpp
patch
|
blob
|
history
src/video/gl/gl_lightmap.hpp
patch
|
blob
|
history
src/video/gl/gl_painter.cpp
patch
|
blob
|
history
src/video/sdl/sdl_painter.cpp
patch
|
blob
|
history
src/video/surface_ptr.hpp
patch
|
blob
|
history
src/video/texture_manager.hpp
patch
|
blob
|
history
src/video/texture_ptr.hpp
patch
|
blob
|
history
diff --git
a/src/object/coin.cpp
b/src/object/coin.cpp
index
cf82ff3
..
0d3a771
100644
(file)
--- a/
src/object/coin.cpp
+++ b/
src/object/coin.cpp
@@
-38,8
+38,8
@@
Coin::Coin(const Vector& pos)
Coin::Coin(const Vector& pos, TileMap* tilemap)
: MovingSprite(pos, "images/objects/coin/coin.sprite", LAYER_OBJECTS - 1, COLGROUP_TOUCHABLE),
Coin::Coin(const Vector& pos, TileMap* tilemap)
: MovingSprite(pos, "images/objects/coin/coin.sprite", LAYER_OBJECTS - 1, COLGROUP_TOUCHABLE),
- path(
boost
::shared_ptr<Path>(tilemap->get_path())),
- walker(
boost
::shared_ptr<PathWalker>(tilemap->get_walker())),
+ path(
std
::shared_ptr<Path>(tilemap->get_path())),
+ walker(
std
::shared_ptr<PathWalker>(tilemap->get_walker())),
offset(),
from_tilemap(true),
physic()
offset(),
from_tilemap(true),
physic()
diff --git
a/src/object/coin.hpp
b/src/object/coin.hpp
index
132a472
..
205d843
100644
(file)
--- a/
src/object/coin.hpp
+++ b/
src/object/coin.hpp
@@
-37,8
+37,8
@@
public:
virtual void update(float elapsed_time);
private:
virtual void update(float elapsed_time);
private:
-
boost
::shared_ptr<Path> path;
-
boost
::shared_ptr<PathWalker> walker;
+
std
::shared_ptr<Path> path;
+
std
::shared_ptr<PathWalker> walker;
Vector offset;
bool from_tilemap;
Physic physic;
Vector offset;
bool from_tilemap;
Physic physic;
diff --git
a/src/object/tilemap.hpp
b/src/object/tilemap.hpp
index
da17b5d
..
17e151c
100644
(file)
--- a/
src/object/tilemap.hpp
+++ b/
src/object/tilemap.hpp
@@
-17,8
+17,6
@@
#ifndef HEADER_SUPERTUX_OBJECT_TILEMAP_HPP
#define HEADER_SUPERTUX_OBJECT_TILEMAP_HPP
#ifndef HEADER_SUPERTUX_OBJECT_TILEMAP_HPP
#define HEADER_SUPERTUX_OBJECT_TILEMAP_HPP
-#include <boost/shared_ptr.hpp>
-
#include "object/path_walker.hpp"
#include "supertux/game_object.hpp"
#include "supertux/script_interface.hpp"
#include "object/path_walker.hpp"
#include "supertux/game_object.hpp"
#include "supertux/script_interface.hpp"
@@
-90,10
+88,10
@@
public:
}
}
}
}
-
boost
::shared_ptr<Path> get_path()
+
std
::shared_ptr<Path> get_path()
{ return path; }
{ return path; }
-
boost
::shared_ptr<PathWalker> get_walker()
+
std
::shared_ptr<PathWalker> get_walker()
{ return walker; }
void set_offset(const Vector &offset_)
{ return walker; }
void set_offset(const Vector &offset_)
@@
-193,8
+191,8
@@
private:
float current_alpha; /**< current tilemap opacity */
float remaining_fade_time; /**< seconds until requested tilemap opacity is reached */
float current_alpha; /**< current tilemap opacity */
float remaining_fade_time; /**< seconds until requested tilemap opacity is reached */
-
boost
::shared_ptr<Path> path;
-
boost
::shared_ptr<PathWalker> walker;
+
std
::shared_ptr<Path> path;
+
std
::shared_ptr<PathWalker> walker;
DrawingContext::Target draw_target; /**< set to LIGHTMAP to draw to lightmap */
DrawingContext::Target draw_target; /**< set to LIGHTMAP to draw to lightmap */
diff --git
a/src/sprite/sprite_ptr.hpp
b/src/sprite/sprite_ptr.hpp
index
5e48ad3
..
e919abb
100644
(file)
--- a/
src/sprite/sprite_ptr.hpp
+++ b/
src/sprite/sprite_ptr.hpp
@@
-17,11
+17,11
@@
#ifndef HEADER_SUPERTUX_SPRITE_SPRITE_PTR_HPP
#define HEADER_SUPERTUX_SPRITE_SPRITE_PTR_HPP
#ifndef HEADER_SUPERTUX_SPRITE_SPRITE_PTR_HPP
#define HEADER_SUPERTUX_SPRITE_SPRITE_PTR_HPP
-#include <
boost/shared_ptr.hpp
>
+#include <
memory
>
class Sprite;
class Sprite;
-typedef
boost
::shared_ptr<Sprite> SpritePtr;
+typedef
std
::shared_ptr<Sprite> SpritePtr;
#endif
#endif
diff --git
a/src/video/font_ptr.hpp
b/src/video/font_ptr.hpp
index
bedc567
..
eb70319
100644
(file)
--- a/
src/video/font_ptr.hpp
+++ b/
src/video/font_ptr.hpp
@@
-17,10
+17,10
@@
#ifndef HEADER_SUPERTUX_VIDEO_FONT_PTR_HPP
#define HEADER_SUPERTUX_VIDEO_FONT_PTR_HPP
#ifndef HEADER_SUPERTUX_VIDEO_FONT_PTR_HPP
#define HEADER_SUPERTUX_VIDEO_FONT_PTR_HPP
-#include <
boost/shared_ptr.hpp
>
+#include <
memory
>
class Font;
class Font;
-typedef
boost
::shared_ptr<Font> FontPtr;
+typedef
std
::shared_ptr<Font> FontPtr;
#endif
#endif
diff --git
a/src/video/gl/gl_lightmap.hpp
b/src/video/gl/gl_lightmap.hpp
index
9225cd7
..
786547c
100644
(file)
--- a/
src/video/gl/gl_lightmap.hpp
+++ b/
src/video/gl/gl_lightmap.hpp
@@
-42,7
+42,7
@@
public:
private:
static const int s_LIGHTMAP_DIV = 5;
private:
static const int s_LIGHTMAP_DIV = 5;
-
boost
::shared_ptr<GLTexture> m_lightmap;
+
std
::shared_ptr<GLTexture> m_lightmap;
int m_lightmap_width;
int m_lightmap_height;
float m_lightmap_uv_right;
int m_lightmap_width;
int m_lightmap_height;
float m_lightmap_uv_right;
diff --git
a/src/video/gl/gl_painter.cpp
b/src/video/gl/gl_painter.cpp
index
6ff1d80
..
ecb3cb1
100644
(file)
--- a/
src/video/gl/gl_painter.cpp
+++ b/
src/video/gl/gl_painter.cpp
@@
-144,7
+144,7
@@
GLPainter::draw_surface_part(const DrawingRequest& request)
const SurfacePartRequest* surfacepartrequest
= (SurfacePartRequest*) request.request_data;
const Surface* surface = surfacepartrequest->surface;
const SurfacePartRequest* surfacepartrequest
= (SurfacePartRequest*) request.request_data;
const Surface* surface = surfacepartrequest->surface;
-
boost::shared_ptr<GLTexture> gltexture = boost
::dynamic_pointer_cast<GLTexture>(surface->get_texture());
+
std::shared_ptr<GLTexture> gltexture = std
::dynamic_pointer_cast<GLTexture>(surface->get_texture());
GLSurfaceData *surface_data = reinterpret_cast<GLSurfaceData *>(surface->get_surface_data());
float uv_width = surface_data->get_uv_right() - surface_data->get_uv_left();
GLSurfaceData *surface_data = reinterpret_cast<GLSurfaceData *>(surface->get_surface_data());
float uv_width = surface_data->get_uv_right() - surface_data->get_uv_left();
diff --git
a/src/video/sdl/sdl_painter.cpp
b/src/video/sdl/sdl_painter.cpp
index
7f250bb
..
0da8c28
100644
(file)
--- a/
src/video/sdl/sdl_painter.cpp
+++ b/
src/video/sdl/sdl_painter.cpp
@@
-59,7
+59,7
@@
void
SDLPainter::draw_surface(SDL_Renderer* renderer, const DrawingRequest& request)
{
const Surface* surface = static_cast<const SurfaceRequest*>(request.request_data)->surface;
SDLPainter::draw_surface(SDL_Renderer* renderer, const DrawingRequest& request)
{
const Surface* surface = static_cast<const SurfaceRequest*>(request.request_data)->surface;
-
boost::shared_ptr<SDLTexture> sdltexture = boost
::dynamic_pointer_cast<SDLTexture>(surface->get_texture());
+
std::shared_ptr<SDLTexture> sdltexture = std
::dynamic_pointer_cast<SDLTexture>(surface->get_texture());
SDL_Rect dst_rect;
dst_rect.x = request.pos.x;
SDL_Rect dst_rect;
dst_rect.x = request.pos.x;
@@
-96,7
+96,7
@@
SDLPainter::draw_surface_part(SDL_Renderer* renderer, const DrawingRequest& requ
const SurfacePartRequest* surface = (const SurfacePartRequest*) request.request_data;
const SurfacePartRequest* surfacepartrequest = (SurfacePartRequest*) request.request_data;
const SurfacePartRequest* surface = (const SurfacePartRequest*) request.request_data;
const SurfacePartRequest* surfacepartrequest = (SurfacePartRequest*) request.request_data;
-
boost::shared_ptr<SDLTexture> sdltexture = boost
::dynamic_pointer_cast<SDLTexture>(surface->surface->get_texture());
+
std::shared_ptr<SDLTexture> sdltexture = std
::dynamic_pointer_cast<SDLTexture>(surface->surface->get_texture());
SDL_Rect src_rect;
src_rect.x = surfacepartrequest->srcrect.p1.x;
SDL_Rect src_rect;
src_rect.x = surfacepartrequest->srcrect.p1.x;
diff --git
a/src/video/surface_ptr.hpp
b/src/video/surface_ptr.hpp
index
c739c56
..
5c35568
100644
(file)
--- a/
src/video/surface_ptr.hpp
+++ b/
src/video/surface_ptr.hpp
@@
-17,10
+17,10
@@
#ifndef HEADER_SUPERTUX_VIDEO_SURFACE_PTR_HPP
#define HEADER_SUPERTUX_VIDEO_SURFACE_PTR_HPP
#ifndef HEADER_SUPERTUX_VIDEO_SURFACE_PTR_HPP
#define HEADER_SUPERTUX_VIDEO_SURFACE_PTR_HPP
-#include <
boost/shared_ptr.hpp
>
+#include <
memory
>
class Surface;
class Surface;
-typedef
boost
::shared_ptr<Surface> SurfacePtr;
+typedef
std
::shared_ptr<Surface> SurfacePtr;
#endif
#endif
diff --git
a/src/video/texture_manager.hpp
b/src/video/texture_manager.hpp
index
306b40e
..
54520e2
100644
(file)
--- a/
src/video/texture_manager.hpp
+++ b/
src/video/texture_manager.hpp
@@
-22,10
+22,10
@@
#include <config.h>
#include <map>
#include <config.h>
#include <map>
+#include <memory>
#include <set>
#include <string>
#include <vector>
#include <set>
#include <string>
#include <vector>
-#include <boost/weak_ptr.hpp>
#include "util/currenton.hpp"
#include "video/glutil.hpp"
#include "util/currenton.hpp"
#include "video/glutil.hpp"
@@
-55,7
+55,7
@@
public:
private:
friend class Texture;
private:
friend class Texture;
- typedef std::map<std::string,
boost
::weak_ptr<Texture> > ImageTextures;
+ typedef std::map<std::string,
std
::weak_ptr<Texture> > ImageTextures;
ImageTextures m_image_textures;
typedef std::map<std::string, SDL_Surface*> Surfaces;
ImageTextures m_image_textures;
typedef std::map<std::string, SDL_Surface*> Surfaces;
diff --git
a/src/video/texture_ptr.hpp
b/src/video/texture_ptr.hpp
index
14321bb
..
1eea17c
100644
(file)
--- a/
src/video/texture_ptr.hpp
+++ b/
src/video/texture_ptr.hpp
@@
-17,10
+17,10
@@
#ifndef HEADER_SUPERTUX_VIDEO_TEXTURE_PTR_HPP
#define HEADER_SUPERTUX_VIDEO_TEXTURE_PTR_HPP
#ifndef HEADER_SUPERTUX_VIDEO_TEXTURE_PTR_HPP
#define HEADER_SUPERTUX_VIDEO_TEXTURE_PTR_HPP
-#include <
boost/shared_ptr.hpp
>
+#include <
memory
>
class Texture;
class Texture;
-typedef
boost
::shared_ptr<Texture> TexturePtr;
+typedef
std
::shared_ptr<Texture> TexturePtr;
#endif
#endif