MCPcopy Create free account
hub / github.com/defold/defold / MakeHandle

Function MakeHandle

engine/dlib/src/dlib/connection_pool.cpp:172–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170 }
171
172 static HConnection MakeHandle(HPool pool, uint32_t index, Connection* c) {
173 if (pool->m_NextVersion == 0) {
174 pool->m_NextVersion = 1;
175 }
176 uint16_t v = pool->m_NextVersion;
177 pool->m_NextVersion++;
178 c->m_Version = v;
179 return (v << 16) | (index & 0xffff);
180 }
181
182 static Connection* GetConnection(HPool pool, HConnection c) {
183 uint16_t v = c >> 16;

Callers 2

FindConnectionFunction · 0.70
DoDialFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected