From f8f7550782a017f90ea75f4e417b3b78aa0c7f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Mon, 17 Mar 2014 13:27:50 +0100 Subject: [PATCH] Made single-argument constructors explicit. Avoids unintended implicit conversions. --- opm/core/grid/GridManager.hpp | 6 +++--- opm/core/wells/WellsManager.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/opm/core/grid/GridManager.hpp b/opm/core/grid/GridManager.hpp index 030d5555..4ffe73d2 100644 --- a/opm/core/grid/GridManager.hpp +++ b/opm/core/grid/GridManager.hpp @@ -44,10 +44,10 @@ namespace Opm { public: /// Construct a 3d corner-point grid or tensor grid from a deck. - GridManager(const Opm::EclipseGridParser& deck); + explicit GridManager(const Opm::EclipseGridParser& deck); /// Construct a 3d corner-point grid or tensor grid from a deck. - GridManager(Opm::DeckConstPtr newParserDeck); + explicit GridManager(Opm::DeckConstPtr newParserDeck); /// Construct a 2d cartesian grid with cells of unit size. GridManager(int nx, int ny); @@ -65,7 +65,7 @@ namespace Opm /// Construct a grid from an input file. /// The file format used is currently undocumented, /// and is therefore only suited for internal use. - GridManager(const std::string& input_filename); + explicit GridManager(const std::string& input_filename); /// Destructor. ~GridManager(); diff --git a/opm/core/wells/WellsManager.hpp b/opm/core/wells/WellsManager.hpp index 9e5c314c..c3bbe633 100644 --- a/opm/core/wells/WellsManager.hpp +++ b/opm/core/wells/WellsManager.hpp @@ -66,7 +66,7 @@ namespace Opm /// manage control switching does not exist. /// /// @param[in] W Existing wells object. - WellsManager(struct Wells* W); + explicit WellsManager(struct Wells* W); /// Construct from input deck and grid. /// The permeability argument may be zero if the input contain