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

Method copyMap

valdi_core/src/valdi_core/cpp/Utils/Marshaller.cpp:110–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110void Marshaller::copyMap(int mapIndex, int intoMapIndex) {
111 auto iterator = pushMapIterator(mapIndex);
112 if (!_exceptionTracker) {
113 return;
114 }
115
116 while (pushMapIteratorNextEntry(iterator)) {
117 auto key = getString(-2);
118 if (!_exceptionTracker) {
119 return;
120 }
121
122 putMapProperty(key, intoMapIndex);
123 if (!_exceptionTracker) {
124 return;
125 }
126
127 pop();
128 if (!_exceptionTracker) {
129 return;
130 }
131 }
132
133 if (!_exceptionTracker) {
134 return;
135 }
136
137 pop();
138}
139
140Ref<ValueArray> Marshaller::toArray() {
141 auto n = size();

Callers 1

TESTFunction · 0.80

Calls 1

getStringFunction · 0.85

Tested by 1

TESTFunction · 0.64