MCPcopy Create free account
hub / github.com/OSVR/OSVR-Core / convertPeerToLocalID

Method convertPeerToLocalID

src/osvr/Common/RegisteredStringMap.cpp:90–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88 }
89
90 util::StringID
91 CorrelatedStringMap::convertPeerToLocalID(util::PeerStringID peerID) const {
92 if (peerID.empty()) {
93 return util::StringID();
94 }
95 if (peerID.value() >= m_remoteToLocal.size()) {
96 throw std::out_of_range("Peer ID out of range!");
97 }
98 return util::StringID(m_remoteToLocal[peerID.value()]);
99 }
100
101 void CorrelatedStringMap::setupPeerMappings(
102 std::vector<std::string> const &peerEntries) {

Callers 1

TEST_FFunction · 0.80

Calls 3

valueMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected