replace boost::scoped_ptr by std::unique_ptr

thanks to Bård Skaflestad, Atgeirr Rasmusen and Roland Kaufmann for
the hint.
This commit is contained in:
Andreas Lauser
2013-08-08 15:21:38 +02:00
parent 8afc71db57
commit 2a26964c7d
5 changed files with 10 additions and 10 deletions
+5 -5
View File
@@ -44,7 +44,7 @@
#include <opm/core/simulator/WellState.hpp>
#include <opm/core/simulator/SimulatorCompressibleTwophase.hpp>
#include <boost/scoped_ptr.hpp>
#include <memory>
#include <boost/filesystem.hpp>
#include <algorithm>
@@ -79,10 +79,10 @@ main(int argc, char** argv)
// If we have a "deck_filename", grid and props will be read from that.
bool use_deck = param.has("deck_filename");
boost::scoped_ptr<EclipseGridParser> deck;
boost::scoped_ptr<GridManager> grid;
boost::scoped_ptr<BlackoilPropertiesInterface> props;
boost::scoped_ptr<RockCompressibility> rock_comp;
std::unique_ptr<EclipseGridParser> deck;
std::unique_ptr<GridManager> grid;
std::unique_ptr<BlackoilPropertiesInterface> props;
std::unique_ptr<RockCompressibility> rock_comp;
BlackoilState state;
// bool check_well_controls = false;
// int max_well_control_iterations = 0;
@@ -49,7 +49,7 @@
#include <opm/core/transport/reorder/TransportSolverCompressibleTwophaseReorder.hpp>
#include <boost/filesystem.hpp>
#include <boost/scoped_ptr.hpp>
#include <memory>
#include <boost/lexical_cast.hpp>
#include <numeric>
@@ -90,7 +90,7 @@ namespace Opm
private:
class Impl;
// Using shared_ptr instead of scoped_ptr since scoped_ptr requires complete type for Impl.
// Using shared_ptr instead of unique_ptr since unique_ptr requires complete type for Impl.
std::shared_ptr<Impl> pimpl_;
};
+2 -2
View File
@@ -47,7 +47,7 @@
#include <opm/core/transport/reorder/TransportSolverTwophaseReorder.hpp>
#include <opm/core/transport/implicit/TransportSolverTwophaseImplicit.hpp>
#include <boost/filesystem.hpp>
#include <boost/scoped_ptr.hpp>
#include <memory>
#include <boost/lexical_cast.hpp>
#include <boost/function.hpp>
#include <boost/signal.hpp>
@@ -98,7 +98,7 @@ namespace Opm
const FlowBoundaryConditions* bcs_;
// Solvers
IncompTpfa psolver_;
boost::scoped_ptr<TransportSolverTwophaseInterface> tsolver_;
std::unique_ptr<TransportSolverTwophaseInterface> tsolver_;
// Misc. data
std::vector<int> allcells_;
+1 -1
View File
@@ -119,7 +119,7 @@ namespace Opm
private:
struct Impl;
// Using shared_ptr instead of scoped_ptr since scoped_ptr requires complete type for Impl.
// Using shared_ptr instead of unique_ptr since unique_ptr requires complete type for Impl.
std::shared_ptr<Impl> pimpl_;
// implementation which is not templated, and can be in library