Initialize boolean variables in-class.

Initialize the boolean variables hasRunInit_ and hasRunCleanup_ in
the class instead of in the constructor.
This commit is contained in:
Håkon Hægland committed 2020-11-03 16:17:52 +01:00
1 parent 0403d4e6e7
commit 53cbe0c57e
2 files changed
+4 -4

No files matched your search

+3 -3
View File
@@ -40,12 +40,12 @@ public:
private:
const std::string deckFilename_;
bool hasRunInit_;
bool hasRunCleanup_;
bool hasRunInit_ = false;
bool hasRunCleanup_ = false;
std::unique_ptr<FlowMainEbosType> mainEbos_;
std::unique_ptr<Opm::Main> main_;
};
} // namespace Opm::Python
} // namespace Opm::Pybind
#endif // OPM_SIMULATORS_HEADER_INCLUDED
+1 -1
View File
@@ -18,7 +18,7 @@ namespace py = pybind11;
namespace Opm::Pybind {
BlackOilSimulator::BlackOilSimulator( const std::string &deckFilename)
: deckFilename_{deckFilename}, hasRunInit_{false}, hasRunCleanup_{false}
: deckFilename_{deckFilename}
{
}