replace all boost:: smart pointers by their std:: equivalents

The std variants are part of c++-2011 and it's 2014 now. (they are
also available in GCC 4.4.)
This commit is contained in:
Andreas Lauser
2014-05-02 16:17:54 +02:00
parent b7f3ee7b79
commit ebb1da0662
10 changed files with 23 additions and 24 deletions

View File

@@ -51,9 +51,9 @@
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/filesystem.hpp>
#include <memory>
#include <algorithm>
#include <iostream>
#include <vector>
@@ -93,9 +93,9 @@ try
OPM_THROW(std::runtime_error, "This simulator cannot run without a deck with wells. Use deck_filename to specify deck.");
}
Opm::DeckConstPtr deck;
boost::scoped_ptr<GridManager> grid;
boost::scoped_ptr<BlackoilPropertiesInterface> props;
boost::scoped_ptr<RockCompressibility> rock_comp;
std::unique_ptr<GridManager> grid;
std::unique_ptr<BlackoilPropertiesInterface> props;
std::unique_ptr<RockCompressibility> rock_comp;
EclipseStateConstPtr eclipseState;
BlackoilState state;
// bool check_well_controls = false;

View File

@@ -49,9 +49,9 @@
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/filesystem.hpp>
#include <memory>
#include <algorithm>
#include <iostream>
#include <vector>
@@ -101,9 +101,9 @@ try
bool use_deck = param.has("deck_filename");
Opm::ParserPtr parser(new Opm::Parser());
Opm::DeckConstPtr deck;
boost::scoped_ptr<GridManager> grid;
boost::scoped_ptr<IncompPropertiesInterface> props;
boost::scoped_ptr<RockCompressibility> rock_comp;
std::unique_ptr<GridManager> grid;
std::unique_ptr<IncompPropertiesInterface> props;
std::unique_ptr<RockCompressibility> rock_comp;
EclipseStateConstPtr eclipseState;
TwophaseState state;
// bool check_well_controls = false;

View File

@@ -41,17 +41,16 @@
#include <opm/core/simulator/BlackoilState.hpp>
#include <opm/core/simulator/initState.hpp>
#include <boost/shared_ptr.hpp>
#include <memory>
#include <algorithm>
#include <iostream>
namespace {
boost::shared_ptr<Wells>
std::shared_ptr<Wells>
createWellConfig()
{
boost::shared_ptr<Wells> wells(create_wells(2, 2, 2),
std::shared_ptr<Wells> wells(create_wells(2, 2, 2),
destroy_wells);
const double inj_frac[] = { 1.0, 0.0 };
@@ -98,7 +97,7 @@ try
const Opm::BlackoilPropertiesBasic props0(param, 2, nc);
const Opm::BlackoilPropsAd props(props0);
boost::shared_ptr<Wells> wells = createWellConfig();
std::shared_ptr<Wells> wells = createWellConfig();
double grav[] = { 0.0, 0.0 };
Opm::DerivedGeology geo(*g, props, grav);

View File

@@ -348,7 +348,7 @@ namespace Opm
RockFromDeck rock_;
std::unique_ptr<SaturationPropsInterface> satprops_;
PhaseUsage phase_usage_;
std::vector<boost::shared_ptr<SinglePvtInterface> > props_;
std::vector<std::shared_ptr<SinglePvtInterface> > props_;
double densities_[BlackoilPhases::MaxNumPhases];
};

View File

@@ -51,9 +51,9 @@
#include <opm/core/transport/reorder/TransportSolverCompressibleTwophaseReorder.hpp>
#include <boost/filesystem.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/lexical_cast.hpp>
#include <memory>
#include <numeric>
#include <fstream>
#include <iostream>

View File

@@ -20,7 +20,7 @@
#ifndef OPM_SIMULATORCOMPRESSIBLEAD_HEADER_INCLUDED
#define OPM_SIMULATORCOMPRESSIBLEAD_HEADER_INCLUDED
#include <boost/shared_ptr.hpp>
#include <memory>
#include <vector>
struct UnstructuredGrid;
@@ -87,7 +87,7 @@ namespace Opm
private:
class Impl;
// Using shared_ptr instead of scoped_ptr since scoped_ptr requires complete type for Impl.
boost::shared_ptr<Impl> pimpl_;
std::shared_ptr<Impl> pimpl_;
};
} // namespace Opm

View File

@@ -20,7 +20,7 @@
#ifndef OPM_SIMULATORFULLYIMPLICITBLACKOIL_HEADER_INCLUDED
#define OPM_SIMULATORFULLYIMPLICITBLACKOIL_HEADER_INCLUDED
#include <boost/shared_ptr.hpp>
#include <memory>
#include <vector>
struct UnstructuredGrid;
@@ -90,7 +90,7 @@ namespace Opm
private:
class Impl;
// Using shared_ptr instead of scoped_ptr since scoped_ptr requires complete type for Impl.
boost::shared_ptr<Impl> pimpl_;
std::shared_ptr<Impl> pimpl_;
};
} // namespace Opm

View File

@@ -46,9 +46,9 @@
#include <opm/core/transport/reorder/TransportSolverCompressibleTwophaseReorder.hpp>
#include <boost/filesystem.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/lexical_cast.hpp>
#include <memory>
#include <numeric>
#include <fstream>
#include <iostream>

View File

@@ -51,9 +51,9 @@
#include <opm/core/transport/implicit/TransportSolverTwophaseImplicit.hpp>
#include <opm/autodiff/TransportSolverTwophaseAd.hpp>
#include <boost/filesystem.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/lexical_cast.hpp>
#include <memory>
#include <numeric>
#include <fstream>
#include <iostream>
@@ -103,7 +103,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_;
};

View File

@@ -20,7 +20,7 @@
#ifndef OPM_SIMULATORINCOMPTWOPHASEAD_HEADER_INCLUDED
#define OPM_SIMULATORINCOMPTWOPHASEAD_HEADER_INCLUDED
#include <boost/shared_ptr.hpp>
#include <memory>
#include <vector>
struct UnstructuredGrid;
@@ -91,7 +91,7 @@ namespace Opm
private:
class Impl;
// Using shared_ptr instead of scoped_ptr since scoped_ptr requires complete type for Impl.
boost::shared_ptr<Impl> pimpl_;
std::shared_ptr<Impl> pimpl_;
};
} // namespace Opm