From b42bcc27605dba459edf041e15496d79a47fd0e7 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Fri, 10 May 2019 11:29:20 -0500 Subject: [PATCH] Wrapping more umesh stuff into ifdefs. Moving pointers into vector during initialization. --- include/openmc/mesh.h | 2 +- src/mesh.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/openmc/mesh.h b/include/openmc/mesh.h index ebfa083d0d..442c0d4ac5 100644 --- a/include/openmc/mesh.h +++ b/include/openmc/mesh.h @@ -79,7 +79,7 @@ public: virtual xt::xarray count_sites(const std::vector& bank, bool* outside) const = 0; - virtual double get_volume_frac(int bin = -1) = 0; + virtual double get_volume_frac(int bin = -1) const = 0; int id_ {-1}; //!< User-specified ID int n_dimension_; //!< Number of dimensions diff --git a/src/mesh.cpp b/src/mesh.cpp index 7a70080e92..0e9c321643 100644 --- a/src/mesh.cpp +++ b/src/mesh.cpp @@ -1408,7 +1408,7 @@ openmc_extend_meshes(int32_t n, int32_t* index_start, int32_t* index_end) { if (index_start) *index_start = model::meshes.size(); for (int i = 0; i < n; ++i) { - model::meshes.push_back(std::make_unique()); + model::meshes.push_back(std::move(std::make_unique())); } if (index_end) *index_end = model::meshes.size() - 1; @@ -1780,6 +1780,7 @@ void read_meshes(pugi::xml_node root) { for (auto node : root.children("mesh")) { + std::string mesh_type; if (check_for_node(node, "type")) { mesh_type = get_node_value(node, "type", true, true);