shared_ptr -> std::shared_ptr

This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
This commit is contained in:
void_17
2026-03-02 15:58:20 +07:00
parent d63f79325f
commit 7074f35e4b
1373 changed files with 12054 additions and 12054 deletions

View File

@@ -1,6 +1,6 @@
/*
Copyright 2005-2007 Adobe Systems Incorporated
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -20,7 +20,7 @@
#include <ios>
#include "../../gil_config.hpp"
#include <boost/shared_ptr.hpp>
#include <boost/std::shared_ptr.hpp>
namespace boost { namespace gil {
@@ -30,7 +30,7 @@ inline void io_error_if(bool expr, const char* descr="") { if (expr) io_error(de
namespace detail {
class file_mgr {
protected:
shared_ptr<FILE> _fp;
std::shared_ptr<FILE> _fp;
struct null_deleter { void operator()(void const*) const {} };
file_mgr(FILE* file) : _fp(file, null_deleter()) {}
@@ -38,7 +38,7 @@ namespace detail {
file_mgr(const char* filename, const char* flags) {
FILE* fp;
io_error_if((fp=fopen(filename,flags))==NULL, "file_mgr: failed to open file");
_fp=shared_ptr<FILE>(fp,fclose);
_fp=std::shared_ptr<FILE>(fp,fclose);
}
public:

View File

@@ -1,6 +1,6 @@
/*
Copyright 2005-2007 Adobe Systems Incorporated
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -24,7 +24,7 @@
#include <stdio.h>
#include <string>
#include <boost/mpl/bool.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/std::shared_ptr.hpp>
#include "../dynamic_image/dynamic_image_all.hpp"
#include "io_error.hpp"
@@ -43,7 +43,7 @@ struct jpeg_write_is_supported {
class jpeg_writer_dynamic : public jpeg_writer {
int _quality;
public:
public:
jpeg_writer_dynamic(FILE* file, int quality=100) : jpeg_writer(file) , _quality(quality) {}
jpeg_writer_dynamic(const char* filename, int quality=100) : jpeg_writer(filename), _quality(quality) {}
@@ -74,7 +74,7 @@ class jpeg_reader_dynamic : public jpeg_reader {
public:
jpeg_reader_dynamic(FILE* file) : jpeg_reader(file) {}
jpeg_reader_dynamic(const char* filename) : jpeg_reader(filename){}
template <typename Images>
void read_image(any_image<Images>& im) {
if (!construct_matched(im,detail::jpeg_type_format_checker(_cinfo.out_color_space))) {
@@ -110,7 +110,7 @@ inline void jpeg_read_image(const std::string& filename,any_image<Images>& im) {
/// \ingroup JPEG_IO
/// \brief Saves the currently instantiated view to a jpeg file specified by the given jpeg image file name.
/// Throws std::ios_base::failure if the currently instantiated view type is not supported for writing by the I/O extension
/// Throws std::ios_base::failure if the currently instantiated view type is not supported for writing by the I/O extension
/// or if it fails to create the file.
template <typename Views>
inline void jpeg_write_view(const char* filename,const any_image_view<Views>& runtime_view) {

View File

@@ -1,6 +1,6 @@
/*
Copyright 2005-2007 Adobe Systems Incorporated
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -24,7 +24,7 @@
#include <algorithm>
#include <string>
#include <boost/static_assert.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/std::shared_ptr.hpp>
extern "C" {
#include <jpeglib.h>
}
@@ -64,7 +64,7 @@ inline point2<std::ptrdiff_t> jpeg_read_dimensions(const std::string& filename)
/// \ingroup JPEG_IO
/// \brief Loads the image specified by the given jpeg image file name into the given view.
/// Triggers a compile assert if the view color space and channel depth are not supported by the JPEG library or by the I/O extension.
/// Throws std::ios_base::failure if the file is not a valid JPEG file, or if its color space or channel depth are not
/// Throws std::ios_base::failure if the file is not a valid JPEG file, or if its color space or channel depth are not
/// compatible with the ones specified by View, or if its dimensions don't match the ones of the view.
template <typename View>
inline void jpeg_read_view(const char* filename,const View& view) {
@@ -84,7 +84,7 @@ inline void jpeg_read_view(const std::string& filename,const View& view) {
/// \ingroup JPEG_IO
/// \brief Allocates a new image whose dimensions are determined by the given jpeg image file, and loads the pixels into it.
/// Triggers a compile assert if the image color space or channel depth are not supported by the JPEG library or by the I/O extension.
/// Throws std::ios_base::failure if the file is not a valid JPEG file, or if its color space or channel depth are not
/// Throws std::ios_base::failure if the file is not a valid JPEG file, or if its color space or channel depth are not
/// compatible with the ones specified by Image
template <typename Image>
inline void jpeg_read_image(const char* filename,Image& im) {

View File

@@ -1,6 +1,6 @@
/*
Copyright 2005-2007 Adobe Systems Incorporated
Use, modification and distribution are subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
@@ -31,7 +31,7 @@
#include <string>
#include <stdio.h>
#include <boost/mpl/bool.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/std::shared_ptr.hpp>
#include "../dynamic_image/dynamic_image_all.hpp"
#include "io_error.hpp"
#include "png_io.hpp"
@@ -81,7 +81,7 @@ class png_reader_dynamic : public png_reader {
public:
png_reader_dynamic(FILE* file) : png_reader(file) {}
png_reader_dynamic(const char* filename) : png_reader(filename){}
template <typename Images>
void read_image(any_image<Images>& im) {
png_uint_32 width, height;
@@ -99,7 +99,7 @@ public:
}
};
} // namespace detail
} // namespace detail
/// \ingroup PNG_IO
/// \brief reads a PNG image into a run-time instantiated image
@@ -121,7 +121,7 @@ inline void png_read_image(const std::string& filename,any_image<Images>& im) {
/// \ingroup PNG_IO
/// \brief Saves the currently instantiated view to a png file specified by the given png image file name.
/// Throws std::ios_base::failure if the currently instantiated view type is not supported for writing by the I/O extension
/// Throws std::ios_base::failure if the currently instantiated view type is not supported for writing by the I/O extension
/// or if it fails to create the file.
template <typename Views>
inline void png_write_view(const char* filename,const any_image_view<Views>& runtime_view) {