From 85722f5e5f7f25abd87681465e4e363d80fb9d80 Mon Sep 17 00:00:00 2001 From: shriwise Date: Thu, 22 Feb 2018 21:17:03 -0600 Subject: [PATCH] Adding empty constructor to Surface. Might remove usefulness of explicit constructors. --- include/openmc/surface.h | 3 ++- src/surface.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/openmc/surface.h b/include/openmc/surface.h index 0d272de91b..c03cea6600 100644 --- a/include/openmc/surface.h +++ b/include/openmc/surface.h @@ -65,6 +65,7 @@ public: std::vector neighbor_neg_; //!< List of cells on negative side explicit Surface(pugi::xml_node surf_node); + explicit Surface(); virtual ~Surface() {} @@ -117,7 +118,7 @@ protected: class CADSurface : public Surface { public: - explicit CADSurface(pugi::xml_node surf_node); + explicit CADSurface(); double evaluate(const double xyz[3]) const; double distance(const double xyz[3], const double uvw[3], bool coincident) const; diff --git a/src/surface.cpp b/src/surface.cpp index a8aa8dfb6f..6f34f1f14e 100644 --- a/src/surface.cpp +++ b/src/surface.cpp @@ -138,6 +138,8 @@ void read_coeffs(pugi::xml_node surf_node, int surf_id, double &c1, double &c2, // Surface implementation //============================================================================== +Surface::Surface() {} + Surface::Surface(pugi::xml_node surf_node) { if (check_for_node(surf_node, "id")) { @@ -243,7 +245,7 @@ Surface::to_hdf5(hid_t group_id) const // CADSurface implementation //============================================================================== - CADSurface::CADSurface(pugi::xml_node surf_node) : Surface {surf_node} {} // empty constructor +CADSurface::CADSurface() :Surface{} {} // empty constructor double CADSurface::evaluate(const double xyz[3]) const {