Alert message formatting.
Avoid log output cluttering due to "missing animation objects".
This commit is contained in:
@@ -386,14 +386,24 @@ SGAnimation::SGAnimation(const SGPropertyNode* configNode,
|
|||||||
|
|
||||||
SGAnimation::~SGAnimation()
|
SGAnimation::~SGAnimation()
|
||||||
{
|
{
|
||||||
if (_found)
|
if (!_found)
|
||||||
return;
|
{
|
||||||
|
std::list<std::string>::const_iterator i;
|
||||||
SG_LOG(SG_IO, SG_ALERT, "Could not find at least one of the following"
|
string info;
|
||||||
" objects for animation:\n");
|
for (i = _objectNames.begin(); i != _objectNames.end(); ++i)
|
||||||
std::list<std::string>::const_iterator i;
|
{
|
||||||
for (i = _objectNames.begin(); i != _objectNames.end(); ++i)
|
if (!info.empty())
|
||||||
SG_LOG(SG_IO, SG_ALERT, *i << "\n");
|
info.append(", ");
|
||||||
|
info.append("'");
|
||||||
|
info.append(*i);
|
||||||
|
info.append("'");
|
||||||
|
}
|
||||||
|
if (!info.empty())
|
||||||
|
{
|
||||||
|
SG_LOG(SG_IO, SG_ALERT, "Could not find at least one of the following"
|
||||||
|
" objects for animation: " << info);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|||||||
Reference in New Issue
Block a user