From a44c1f89de907292863b47ecdc62b10cb6685d40 Mon Sep 17 00:00:00 2001 From: aprilnovak Date: Mon, 27 Mar 2023 19:21:30 -0500 Subject: [PATCH] Address review comments. Refs #2442 --- src/material.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/material.cpp b/src/material.cpp index ec82a7eea5..165a5c2e79 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -353,7 +353,7 @@ Material::~Material() model::material_map.erase(id_); } -void Material::clone() +Material & Material::clone() { std::unique_ptr mat = std::make_unique(); mat->index_ = model::materials.size(); @@ -376,12 +376,10 @@ void Material::clone() mat->temperature_ = temperature_; if (ttb_) - { - std::unique_ptr ptr2{new Bremsstrahlung{*ttb_}}; - mat->ttb_ = std::move(ptr2); - } + mat->ttb_ = std::make_unique(*ttb_); model::materials.push_back(std::move(mat)); + return *mat; } void Material::finalize()