Commit a06f72a0 authored by Jan Möbius's avatar Jan Möbius
Browse files

Fixed multiple connections of the omlog streams. closes #917

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@587 fdac6126-5c0c-442c-9429-916003d36597
parent b1dfc573
......@@ -64,6 +64,7 @@ OpenMesh::mostream& omlog()
#ifdef NDEBUG
mystream.disable();
#endif
initialized = true;
}
return mystream;
}
......@@ -73,7 +74,11 @@ OpenMesh::mostream& omout()
{
static bool initialized = false;
static OpenMesh::mostream mystream;
if (!initialized) mystream.connect(std::cout);
if (!initialized)
{
mystream.connect(std::cout);
initialized = true;
}
return mystream;
}
......@@ -82,7 +87,11 @@ OpenMesh::mostream& omerr()
{
static bool initialized = false;
static OpenMesh::mostream mystream;
if (!initialized) mystream.connect(std::cerr);
if (!initialized)
{
mystream.connect(std::cerr);
initialized = true;
}
return mystream;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment