Replaced boost::shared_ptr<> with std::shared_ptr<>
authorIngo Ruhnke <grumbel@gmail.com>
Sun, 31 Aug 2014 05:42:49 +0000 (07:42 +0200)
committerIngo Ruhnke <grumbel@gmail.com>
Sun, 31 Aug 2014 05:54:31 +0000 (07:54 +0200)
src/object/coin.cpp
src/object/coin.hpp
src/object/tilemap.hpp
src/sprite/sprite_ptr.hpp
src/video/font_ptr.hpp
src/video/gl/gl_lightmap.hpp
src/video/gl/gl_painter.cpp
src/video/sdl/sdl_painter.cpp
src/video/surface_ptr.hpp
src/video/texture_manager.hpp
src/video/texture_ptr.hpp

index cf82ff3..0d3a771 100644 (file)
@@ -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),
-    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()
index 132a472..205d843 100644 (file)
@@ -37,8 +37,8 @@ public:
   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;
index da17b5d..17e151c 100644 (file)
@@ -17,8 +17,6 @@
 #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"
@@ -90,10 +88,10 @@ public:
     }
   }
 
-  boost::shared_ptr<Path> get_path()
+  std::shared_ptr<Path> get_path()
   { return path; }
 
-  boost::shared_ptr<PathWalker> get_walker()
+  std::shared_ptr<PathWalker> get_walker()
   { 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 */
 
-  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 */
 
index 5e48ad3..e919abb 100644 (file)
 #ifndef HEADER_SUPERTUX_SPRITE_SPRITE_PTR_HPP
 #define HEADER_SUPERTUX_SPRITE_SPRITE_PTR_HPP
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class Sprite;
 
-typedef boost::shared_ptr<Sprite> SpritePtr;
+typedef std::shared_ptr<Sprite> SpritePtr;
 
 #endif
 
index bedc567..eb70319 100644 (file)
 #ifndef HEADER_SUPERTUX_VIDEO_FONT_PTR_HPP
 #define HEADER_SUPERTUX_VIDEO_FONT_PTR_HPP
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class Font;
-typedef boost::shared_ptr<Font> FontPtr;
+typedef std::shared_ptr<Font> FontPtr;
 
 #endif
 
index 9225cd7..786547c 100644 (file)
@@ -42,7 +42,7 @@ public:
 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;
index 6ff1d80..ecb3cb1 100644 (file)
@@ -144,7 +144,7 @@ GLPainter::draw_surface_part(const DrawingRequest& request)
   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();
index 7f250bb..0da8c28 100644 (file)
@@ -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;
-  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;
@@ -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;
 
-  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;
index c739c56..5c35568 100644 (file)
 #ifndef HEADER_SUPERTUX_VIDEO_SURFACE_PTR_HPP
 #define HEADER_SUPERTUX_VIDEO_SURFACE_PTR_HPP
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class Surface;
-typedef boost::shared_ptr<Surface> SurfacePtr;
+typedef std::shared_ptr<Surface> SurfacePtr;
 
 #endif
 
index 306b40e..54520e2 100644 (file)
 #include <config.h>
 
 #include <map>
+#include <memory>
 #include <set>
 #include <string>
 #include <vector>
-#include <boost/weak_ptr.hpp>
 
 #include "util/currenton.hpp"
 #include "video/glutil.hpp"
@@ -55,7 +55,7 @@ public:
 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;
index 14321bb..1eea17c 100644 (file)
 #ifndef HEADER_SUPERTUX_VIDEO_TEXTURE_PTR_HPP
 #define HEADER_SUPERTUX_VIDEO_TEXTURE_PTR_HPP
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class Texture;
-typedef boost::shared_ptr<Texture> TexturePtr;
+typedef std::shared_ptr<Texture> TexturePtr;
 
 #endif