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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user