| 42 | } |
| 43 | |
| 44 | vrpn_ConnectionPtr |
| 45 | VRPNConnectionCollection::addConnection(vrpn_ConnectionPtr conn, |
| 46 | std::string const &host) { |
| 47 | auto &connMap = *m_connMap; |
| 48 | auto existing = connMap.find(host); |
| 49 | if (existing != end(connMap)) { |
| 50 | return existing->second; |
| 51 | } |
| 52 | connMap[host] = conn; |
| 53 | BOOST_ASSERT(!empty()); |
| 54 | return conn; |
| 55 | } |
| 56 | |
| 57 | vrpn_ConnectionPtr |
| 58 | VRPNConnectionCollection::getConnection(std::string const &device, |
no test coverage detected