Skip to content

Commit f5b3ad0

Browse files
committed
Fixed non-const statics for DetectorDescription/Core
1 parent f4b04d8 commit f5b3ad0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

DetectorDescription/Core/src/DDName.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void DDName::defineId(const std::pair<std::string,std::string> & nm, DDName::id_
8686

8787
const std::string & DDName::name() const
8888
{
89-
static std::string ano_("anonymous");
89+
const static std::string ano_("anonymous");
9090
const std::string * result;
9191
if (id_ < 0) {
9292
result = &ano_;
@@ -100,7 +100,7 @@ const std::string & DDName::name() const
100100

101101
const std::string & DDName::ns() const
102102
{
103-
static std::string ano_("anonymous");
103+
const static std::string ano_("anonymous");
104104
const std::string * result;
105105
if (id_ < 0) {
106106
result = &ano_;

0 commit comments

Comments
 (0)