| 115 | } |
| 116 | |
| 117 | bool LocationManager::Replace(CString const& name, CString const& newName) { |
| 118 | auto it = _items.find(name); |
| 119 | if (it == _items.end()) |
| 120 | return false; |
| 121 | |
| 122 | auto path = it->second; |
| 123 | _items.erase(it); |
| 124 | _items.insert({ newName,path }); |
| 125 | return true; |
| 126 | } |
| 127 | |
| 128 | void LocationManager::Add(CString const& name, CString const& path) { |
| 129 | _items.insert({ name,path }); |
no test coverage detected