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

Initialize m_verbosity_level on demand to avoid depending on the orde… #1798

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading