Skip to content

Commit

Permalink
Merge pull request #1798 from rocallahan/initialize-verbosity
Browse files Browse the repository at this point in the history
Initialize m_verbosity_level on demand to avoid depending on the orde…
  • Loading branch information
klayoutmatthias authored Jul 23, 2024
2 parents d392184 + 8e7d966 commit de08a01
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/tl/tl/tlLog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,22 @@ static int default_verbosity ()
return verbosity;
}

static int m_verbosity_level = default_verbosity ();
static int &verbosity_level ()
{
static int level = default_verbosity ();
return level;
}

void
verbosity (int level)
{
m_verbosity_level = level;
verbosity_level () = level;
}

int
verbosity ()
{
return m_verbosity_level;
return verbosity_level ();
}

// ------------------------------------------------
Expand Down

0 comments on commit de08a01

Please sign in to comment.