IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 08dd7d75 authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

Merge branch '543-get_nucleus_name-returns-string_view-to-temporary-object' into 'master'

Resolve "get_nucleus_name() returns string_view to temporary object"

Closes #543

See merge request !463
parents 17924bb8 5699ccfc
No related branches found
No related tags found
1 merge request!463Resolve "get_nucleus_name() returns string_view to temporary object"
Pipeline #9664 passed with warnings
......@@ -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);
......
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment