From ab227f5da71599d55d94f0ed9a90d7423821d37f Mon Sep 17 00:00:00 2001
From: Maximilian Reininghaus <maximilian.reininghaus@kit.edu>
Date: Thu, 1 Dec 2022 17:58:43 +0100
Subject: [PATCH] change return type of get_nucleus_name() to std::string

---
 corsika/detail/framework/core/ParticleProperties.inl | 2 +-
 corsika/framework/core/ParticleProperties.hpp        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/corsika/detail/framework/core/ParticleProperties.inl b/corsika/detail/framework/core/ParticleProperties.inl
index d15c56115..06bca17cf 100644
--- a/corsika/detail/framework/core/ParticleProperties.inl
+++ b/corsika/detail/framework/core/ParticleProperties.inl
@@ -147,7 +147,7 @@ namespace corsika {
     return get_mass(Code::Proton) * Z + (A - Z) * get_mass(Code::Neutron);
   }
 
-  inline std::string_view get_nucleus_name(Code const code) {
+  inline std::string get_nucleus_name(Code const code) {
     size_t const A = get_nucleus_A(code);
     size_t const Z = get_nucleus_Z(code);
     return fmt::format("Nucleus_A{}_Z{}", A, Z);
diff --git a/corsika/framework/core/ParticleProperties.hpp b/corsika/framework/core/ParticleProperties.hpp
index 98cc681d3..a07e93d55 100644
--- a/corsika/framework/core/ParticleProperties.hpp
+++ b/corsika/framework/core/ParticleProperties.hpp
@@ -207,7 +207,7 @@ namespace corsika {
    * @param code
    * @return std::string_view
    */
-  inline std::string_view get_nucleus_name(Code const code);
+  inline std::string get_nucleus_name(Code const code);
 
   /**
    * @brief convert PDG code to CORSIKA 8 internal code.
-- 
GitLab