MCPcopy Create free account
hub / github.com/VCVRack/Rack / hasCable

Method hasCable

src/engine/Engine.cpp:1099–1104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1097
1098
1099bool Engine::hasCable(Cable* cable) {
1100 SharedLock<SharedMutex> lock(internal->mutex);
1101 // TODO Performance could be improved by searching cablesCache, but more testing would be needed to make sure it's always valid.
1102 auto it = std::find(internal->cables.begin(), internal->cables.end(), cable);
1103 return it != internal->cables.end();
1104}
1105
1106
1107Cable* Engine::getCable(int64_t cableId) {

Callers

nothing calls this directly

Calls 1

findFunction · 0.85

Tested by

no test coverage detected