Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed non-const statics for DetectorDescription/Core #1450

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions DetectorDescription/Core/src/DDName.cc
Expand Up @@ -86,7 +86,7 @@ void DDName::defineId(const std::pair<std::string,std::string> & nm, DDName::id_

const std::string & DDName::name() const
{
static std::string ano_("anonymous");
const static std::string ano_("anonymous");
const std::string * result;
if (id_ < 0) {
result = &ano_;
Expand All @@ -100,7 +100,7 @@ const std::string & DDName::name() const

const std::string & DDName::ns() const
{
static std::string ano_("anonymous");
const static std::string ano_("anonymous");
const std::string * result;
if (id_ < 0) {
result = &ano_;
Expand Down