| 36 | } |
| 37 | |
| 38 | void SubWidgetBinding::add(std::string_view _name, IStateInfo* _data, std::string_view _skin) |
| 39 | { |
| 40 | // ищем такой же ключ |
| 41 | MapStateInfo::const_iterator iter = mStates.find(_name); |
| 42 | if (iter != mStates.end()) |
| 43 | { |
| 44 | delete _data; |
| 45 | MYGUI_LOG(Warning, "state with name '" << _name << "' already exist in skin '" << _skin << "'"); |
| 46 | return; |
| 47 | } |
| 48 | // добавляем |
| 49 | mStates.emplace(_name, _data); |
| 50 | } |
| 51 | |
| 52 | } // namespace MyGUI |
no test coverage detected