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

Function json_array_foreach

src/plugin/Model.cpp:39–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37 size_t i;
38 json_t* tagJ;
39 json_array_foreach(tagsJ, i, tagJ) {
40 std::string tag = json_string_value(tagJ);
41 int tagId = tag::findId(tag);
42 if (tagId < 0) {
43 // WARN("Module %s/%s has invalid tag \"%s\"", plugin->slug.c_str(), slug.c_str(), tag.c_str());
44 continue;
45 }
46
47 // Omit duplicates
48 auto it = std::find(tagIds.begin(), tagIds.end(), tagId);
49 if (it != tagIds.end()) {
50 // WARN("Module %s/%s has duplicate tag \"%s\"", plugin->slug.c_str(), slug.c_str(), tag.c_str());
51 continue;
52 }
53
54 tagIds.push_back(tagId);
55 }
56 }
57
58 // manualUrl

Callers

nothing calls this directly

Calls 2

findIdFunction · 0.85
findFunction · 0.85

Tested by

no test coverage detected