mark constructors explicit
This commit is contained in:
parent
cb394ed19c
commit
6553e8d0b7
4
external/resinsight/LibCore/cvfColor3.h
vendored
4
external/resinsight/LibCore/cvfColor3.h
vendored
@ -112,7 +112,7 @@ public:
|
||||
Color3f();
|
||||
Color3f(float r, float g, float b);
|
||||
Color3f(const Color3f& other);
|
||||
Color3f(ColorIdent colorIdent);
|
||||
explicit Color3f(ColorIdent colorIdent);
|
||||
explicit Color3f(const Color3ub& other);
|
||||
|
||||
Color3f& operator=(const Color3f& rhs);
|
||||
@ -158,7 +158,7 @@ public:
|
||||
Color3ub();
|
||||
Color3ub(ubyte r, ubyte g, ubyte b);
|
||||
Color3ub(const Color3ub& other);
|
||||
Color3ub(ColorIdent colorIdent);
|
||||
explicit Color3ub(ColorIdent colorIdent);
|
||||
explicit Color3ub(const Color3f& other);
|
||||
|
||||
Color3ub& operator=(const Color3ub& rhs);
|
||||
|
2
external/resinsight/LibCore/cvfDebugTimer.h
vendored
2
external/resinsight/LibCore/cvfDebugTimer.h
vendored
@ -60,7 +60,7 @@ public:
|
||||
};
|
||||
|
||||
public:
|
||||
DebugTimer(const char* prefix, OperationMode operationMode = NORMAL);
|
||||
explicit DebugTimer(const char* prefix, OperationMode operationMode = NORMAL);
|
||||
~DebugTimer();
|
||||
|
||||
void restart(const char* msg = NULL);
|
||||
|
2
external/resinsight/LibCore/cvfFlags.h
vendored
2
external/resinsight/LibCore/cvfFlags.h
vendored
@ -52,7 +52,7 @@ class Flags
|
||||
public:
|
||||
inline Flags();
|
||||
inline Flags(const Flags& other);
|
||||
inline Flags(FlagEnum flag);
|
||||
explicit inline Flags(FlagEnum flag);
|
||||
|
||||
inline Flags& operator=(const Flags& rhs);
|
||||
inline Flags& operator=(FlagEnum flag);
|
||||
|
4
external/resinsight/LibCore/cvfObject.h
vendored
4
external/resinsight/LibCore/cvfObject.h
vendored
@ -99,7 +99,7 @@ class ref
|
||||
public:
|
||||
ref(T* object = NULL);
|
||||
ref(const ref& other);
|
||||
template<typename T2> ref(const ref<T2>& other);
|
||||
template<typename T2> explicit ref(const ref<T2>& other);
|
||||
~ref();
|
||||
|
||||
ref& operator=(T* rhs);
|
||||
@ -150,7 +150,7 @@ class cref
|
||||
public:
|
||||
cref(const T* object = NULL);
|
||||
cref(const cref& other);
|
||||
template<typename T2> cref(const cref<T2>& other);
|
||||
template<typename T2> explicit cref(const cref<T2>& other);
|
||||
~cref();
|
||||
|
||||
cref& operator=(const T* rhs);
|
||||
|
2
external/resinsight/cafPdmCore/cafSignal.h
vendored
2
external/resinsight/cafPdmCore/cafSignal.h
vendored
@ -108,7 +108,7 @@ public:
|
||||
using MemberCallbackAndActiveFlag = std::pair<MemberCallback, bool>;
|
||||
|
||||
public:
|
||||
Signal( const SignalEmitter* emitter )
|
||||
explicit Signal( const SignalEmitter* emitter )
|
||||
: m_emitter( emitter )
|
||||
{
|
||||
m_emitter->addEmittedSignal( this );
|
||||
|
@ -34,7 +34,7 @@ namespace Opm {
|
||||
typedef std::vector< DeckItem >::const_iterator const_iterator;
|
||||
|
||||
DeckRecord() = default;
|
||||
DeckRecord( std::vector< DeckItem >&& items, const bool check_for_duplicate_names = true );
|
||||
explicit DeckRecord( std::vector< DeckItem >&& items, const bool check_for_duplicate_names = true );
|
||||
|
||||
static DeckRecord serializationTestObject();
|
||||
|
||||
|
@ -38,7 +38,7 @@ namespace Opm {
|
||||
class DeckTree {
|
||||
public:
|
||||
DeckTree() = default;
|
||||
DeckTree(const std::string&);
|
||||
explicit DeckTree(const std::string&);
|
||||
|
||||
const std::string& parent(const std::string& fname) const;
|
||||
bool includes(const std::string& parent_file, const std::string& include_file) const;
|
||||
|
@ -33,7 +33,7 @@ public:
|
||||
|
||||
|
||||
struct Iterator : public storage_type::iterator {
|
||||
Iterator(storage_type::const_iterator inner_iter) :
|
||||
explicit Iterator(storage_type::const_iterator inner_iter) :
|
||||
inner(inner_iter)
|
||||
{}
|
||||
|
||||
|
@ -124,7 +124,7 @@ namespace Opm {
|
||||
|
||||
AquiferCT() = default;
|
||||
AquiferCT(const TableManager& tables, const Deck& deck);
|
||||
AquiferCT(const std::vector<AquiferCT::AQUCT_data>& data);
|
||||
explicit AquiferCT(const std::vector<AquiferCT::AQUCT_data>& data);
|
||||
|
||||
void loadFromRestart(const RestartIO::RstAquifer& rst,
|
||||
const TableManager& tables);
|
||||
|
@ -75,7 +75,7 @@ namespace Opm {
|
||||
|
||||
/// EclipseGrid ignores ACTNUM in Deck, and therefore needs ACTNUM
|
||||
/// explicitly. If a null pointer is passed, every cell is active.
|
||||
EclipseGrid(const Deck& deck, const int * actnum = nullptr);
|
||||
explicit EclipseGrid(const Deck& deck, const int * actnum = nullptr);
|
||||
|
||||
static bool hasGDFILE(const Deck& deck);
|
||||
static bool hasCylindricalKeywords(const Deck& deck);
|
||||
|
@ -28,7 +28,7 @@ namespace Opm {
|
||||
class PlymaxTable : public SimpleTable {
|
||||
public:
|
||||
|
||||
PlymaxTable( const DeckRecord& record );
|
||||
explicit PlymaxTable(const DeckRecord& record);
|
||||
|
||||
const TableColumn& getPolymerConcentrationColumn() const;
|
||||
const TableColumn& getMaxPolymerConcentrationColumn() const;
|
||||
|
@ -23,13 +23,13 @@
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class DeckReckord;
|
||||
class DeckRecord;
|
||||
|
||||
class PlyrockTable : public SimpleTable {
|
||||
public:
|
||||
|
||||
// This is not really a table; every column has only one element.
|
||||
PlyrockTable( const DeckRecord& record );
|
||||
explicit PlyrockTable(const DeckRecord& record);
|
||||
|
||||
// since this keyword is not necessarily monotonic, it cannot be evaluated!
|
||||
//using SimpleTable::evaluate;
|
||||
|
@ -30,7 +30,7 @@ namespace Opm {
|
||||
class KeywordGenerator {
|
||||
|
||||
public:
|
||||
KeywordGenerator(bool verbose);
|
||||
explicit KeywordGenerator(bool verbose);
|
||||
|
||||
static void ensurePath( const std::string& file_name);
|
||||
static std::string endTest();
|
||||
|
@ -42,7 +42,7 @@ class State {
|
||||
struct RunState {
|
||||
RunState() = default;
|
||||
|
||||
RunState(std::time_t sim_time)
|
||||
explicit RunState(std::time_t sim_time)
|
||||
: run_count(1)
|
||||
, last_run(sim_time)
|
||||
{}
|
||||
|
@ -121,7 +121,7 @@ public:
|
||||
};
|
||||
|
||||
CompletedCells() = default;
|
||||
CompletedCells(const GridDims& dims);
|
||||
explicit CompletedCells(const GridDims& dims);
|
||||
CompletedCells(std::size_t nx, std::size_t ny, std::size_t nz);
|
||||
const Cell& get(std::size_t i, std::size_t j, std::size_t k) const;
|
||||
std::pair<bool, Cell&> try_get(std::size_t i, std::size_t j, std::size_t k);
|
||||
|
@ -31,7 +31,7 @@ class GasLiftGroup {
|
||||
public:
|
||||
GasLiftGroup() = default;
|
||||
|
||||
GasLiftGroup(const std::string& name) :
|
||||
explicit GasLiftGroup(const std::string& name) :
|
||||
m_name(name)
|
||||
{}
|
||||
|
||||
|
@ -111,7 +111,7 @@ public:
|
||||
GuideRateModel::Target target { GuideRateModel::Target::NONE };
|
||||
};
|
||||
|
||||
GuideRate(const Schedule& schedule);
|
||||
explicit GuideRate(const Schedule& schedule);
|
||||
|
||||
void setSerializationTestData();
|
||||
|
||||
|
@ -35,7 +35,7 @@ namespace Opm {
|
||||
class AutoICD : public SICD {
|
||||
public:
|
||||
AutoICD() = default;
|
||||
AutoICD(const DeckRecord& record);
|
||||
explicit AutoICD(const DeckRecord& record);
|
||||
|
||||
static AutoICD serializationTestObject();
|
||||
|
||||
|
@ -90,7 +90,7 @@ namespace Opm {
|
||||
const double x_in,
|
||||
const double y_in);
|
||||
|
||||
Segment(const RestartIO::RstSegment& rst_segment);
|
||||
explicit Segment(const RestartIO::RstSegment& rst_segment);
|
||||
|
||||
static Segment serializationTestObject();
|
||||
|
||||
|
@ -30,7 +30,7 @@ namespace Network {
|
||||
class Node {
|
||||
public:
|
||||
Node() = default;
|
||||
Node(const std::string& name);
|
||||
explicit Node(const std::string& name);
|
||||
|
||||
const std::string& name() const;
|
||||
const std::optional<double>& terminal_pressure() const;
|
||||
|
@ -38,7 +38,7 @@ class UDQState
|
||||
{
|
||||
public:
|
||||
UDQState() = default;
|
||||
UDQState(double undefined);
|
||||
explicit UDQState(double undefined);
|
||||
|
||||
bool has(const std::string& key) const;
|
||||
void load_rst(const RestartIO::RstState& rst_state);
|
||||
|
@ -28,7 +28,7 @@ namespace Opm {
|
||||
|
||||
struct WellInjectionControls {
|
||||
public:
|
||||
WellInjectionControls(int controls_arg) :
|
||||
explicit WellInjectionControls(int controls_arg) :
|
||||
controls(controls_arg)
|
||||
{}
|
||||
|
||||
|
@ -28,7 +28,7 @@ namespace Opm {
|
||||
|
||||
struct WellProductionControls {
|
||||
public:
|
||||
WellProductionControls(int controls_arg) :
|
||||
explicit WellProductionControls(int controls_arg) :
|
||||
controls(controls_arg)
|
||||
{
|
||||
}
|
||||
|
@ -27,8 +27,8 @@ namespace Opm {
|
||||
class Dimension {
|
||||
public:
|
||||
Dimension();
|
||||
Dimension(double SIfactor,
|
||||
double SIoffset = 0.0);
|
||||
explicit Dimension(double SIfactor,
|
||||
double SIoffset = 0.0);
|
||||
|
||||
static Dimension serializationTestObject();
|
||||
|
||||
|
@ -56,7 +56,7 @@ struct Vector{
|
||||
|
||||
|
||||
public:
|
||||
ERsm(const std::string& fname);
|
||||
explicit ERsm(const std::string& fname);
|
||||
|
||||
const std::vector<TimeStampUTC>& dates() const;
|
||||
const std::vector<double>& days() const;
|
||||
|
@ -39,8 +39,8 @@ struct RstAction {
|
||||
|
||||
Quantity() = default;
|
||||
Quantity(const std::string * zacn, double sacn_value);
|
||||
Quantity(const std::string& quantity);
|
||||
Quantity(double value);
|
||||
explicit Quantity(const std::string& quantity);
|
||||
explicit Quantity(double value);
|
||||
};
|
||||
|
||||
|
||||
|
@ -264,7 +264,7 @@ void AquiferCT::loadFromRestart(const RestartIO::RstAquifer& rst,
|
||||
|
||||
AquiferCT AquiferCT::serializationTestObject()
|
||||
{
|
||||
return { { AQUCT_data::serializationTestObject() } };
|
||||
return AquiferCT{ { AQUCT_data::serializationTestObject() } };
|
||||
}
|
||||
|
||||
std::size_t AquiferCT::size() const {
|
||||
|
@ -136,7 +136,7 @@ namespace {
|
||||
parseContext.handleError(ParseContext::PARSE_EXTRA_DATA , msg_format, location, errors);
|
||||
}
|
||||
|
||||
return { std::move( items ), false };
|
||||
return DeckRecord{ std::move( items ), false };
|
||||
}
|
||||
|
||||
bool ParserRecord::equal(const ParserRecord& other) const {
|
||||
|
Loading…
Reference in New Issue
Block a user