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

Method pushMapIteratorNextEntry

valdi_core/src/valdi_core/cpp/Utils/Marshaller.cpp:442–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440}
441
442bool Marshaller::pushMapIteratorNextEntry(int index) {
443 auto iterator = getOrUndefinedAsRef(index).checkedToValdiObject<ValueMapIterator>(_exceptionTracker);
444 if (!_exceptionTracker) {
445 return false;
446 }
447
448 auto entry = iterator->next();
449 if (entry) {
450 push(Value(entry->first));
451 push(std::move(entry->second));
452 return true;
453 } else {
454 return false;
455 }
456}
457
458int Marshaller::duplicate(int index) {
459 auto value = get(index);

Callers 3

TESTFunction · 0.80

Calls 3

pushFunction · 0.85
ValueClass · 0.70
nextMethod · 0.65

Tested by 1

TESTFunction · 0.64