comparison Core/Images/ImageProcessing.cpp @ 3712:2a170a8f1faf

replacing std::auto_ptr by std::unique_ptr
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 02 Mar 2020 15:32:45 +0100
parents a9ce35d67c3c
children 73c22208272f
comparison
equal deleted inserted replaced
3709:1f4910999fe7 3712:2a170a8f1faf
2056 2056
2057 2057
2058 ImageAccessor* ImageProcessing::Halve(const ImageAccessor& source, 2058 ImageAccessor* ImageProcessing::Halve(const ImageAccessor& source,
2059 bool forceMinimalPitch) 2059 bool forceMinimalPitch)
2060 { 2060 {
2061 std::auto_ptr<Image> target(new Image(source.GetFormat(), source.GetWidth() / 2, 2061 std::unique_ptr<Image> target(new Image(source.GetFormat(), source.GetWidth() / 2,
2062 source.GetHeight() / 2, forceMinimalPitch)); 2062 source.GetHeight() / 2, forceMinimalPitch));
2063 Resize(*target, source); 2063 Resize(*target, source);
2064 return target.release(); 2064 return target.release();
2065 } 2065 }
2066 2066
2067 2067
2457 2457
2458 ImageAccessor* ImageProcessing::FitSize(const ImageAccessor& source, 2458 ImageAccessor* ImageProcessing::FitSize(const ImageAccessor& source,
2459 unsigned int width, 2459 unsigned int width,
2460 unsigned int height) 2460 unsigned int height)
2461 { 2461 {
2462 std::auto_ptr<ImageAccessor> target(new Image(source.GetFormat(), width, height, false)); 2462 std::unique_ptr<ImageAccessor> target(new Image(source.GetFormat(), width, height, false));
2463 FitSize(*target, source); 2463 FitSize(*target, source);
2464 return target.release(); 2464 return target.release();
2465 } 2465 }
2466 } 2466 }