MCPcopy Create free account
hub / github.com/Snapchat/Valdi / getConsumerIndex

Method getConsumerIndex

valdi/src/valdi/runtime/Resources/ManagedAsset.cpp:55–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55std::optional<size_t> ManagedAsset::getConsumerIndex(const Ref<AssetConsumer>& consumer) const {
56 for (size_t i = 0; i < _consumers.size(); i++) {
57 if (_consumers[i] == consumer) {
58 return {i};
59 }
60 }
61
62 return std::nullopt;
63}
64
65const Ref<AssetConsumer>& ManagedAsset::getConsumer(size_t index) const {
66 return _consumers[index];

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected