Skip to content

Commit

Permalink
Merge pull request #1450 from nclopezo/threadSafetyDetectorDescriptio…
Browse files Browse the repository at this point in the history
…nCore

Multithreading fixes -- Fixed non-const statics for DetectorDescription/Core
  • Loading branch information
ktf committed Nov 15, 2013
2 parents 0e45185 + f5b3ad0 commit d4aa4af
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit d4aa4af

Please sign in to comment.