avoid INFO message about duplicate enums with and without _EXT

This commit is contained in:
Laurens Voerman
2017-04-07 15:56:32 +02:00
parent 43891d6cc1
commit 36fc30d8e7
2 changed files with 16 additions and 9 deletions

View File

@@ -58,6 +58,18 @@ public:
_stringToValue[str] = value;
}
void add2(const char* str, const char* newStr, Value value) {
if (_valueToString.find(value) != _valueToString.end())
{
osg::notify(osg::INFO) << "Duplicate enum value " << value
<< " with old string: " << _valueToString[value]
<< " and new strings: " << str << " and " << newStr << std::endl;
}
_valueToString[value] = newStr;
_stringToValue[newStr] = value;
_stringToValue[str] = value;
}
Value getValue( const char* str )
{
StringToValue::iterator itr = _stringToValue.find(str);