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

Function assignReferenceInfo

valdi_core/src/valdi_core/cpp/Utils/ReferenceInfo.cpp:283–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283static void assignReferenceInfo(ComponentsVector& components,
284 NamesVector& names,
285 const ReferenceInfo& referenceInfo,
286 bool isFunction) {
287 const auto* begin = referenceInfo.begin();
288 const auto* end = referenceInfo.end();
289
290 const auto* it = begin;
291
292 bool first = true;
293 while (it != end) {
294 bool resolvedIsFunction = it->isFunction || (first && isFunction);
295 first = false;
296 if (!assignComponent(components,
297 names,
298 it->type,
299 static_cast<size_t>(it->index),
300 &referenceInfo.getNameForComponent(*it),
301 resolvedIsFunction)) {
302 break;
303 }
304 it++;
305 }
306}
307
308ReferenceInfo ReferenceInfoBuilder::build() const {
309 ComponentsVector components;

Callers 1

buildMethod · 0.85

Calls 3

assignComponentFunction · 0.85
endMethod · 0.65
beginMethod · 0.45

Tested by

no test coverage detected