MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / removeModule

Method removeModule

plugins/plugins-mini.cpp:165–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163 }
164
165 void removeModule(const char* const slugToRemove) const noexcept
166 {
167 json_t* const modules = json_object_get(rootJ, "modules");
168 DISTRHO_SAFE_ASSERT_RETURN(modules != nullptr,);
169
170 size_t i;
171 json_t* v;
172 json_array_foreach(modules, i, v)
173 {
174 if (json_t* const slug = json_object_get(v, "slug"))
175 {
176 if (const char* const value = json_string_value(slug))
177 {
178 if (std::strcmp(value, slugToRemove) == 0)
179 {
180 json_array_remove(modules, i);
181 break;
182 }
183 }
184 }
185 }
186 }
187};
188
189static void initStatic__Cardinal()

Callers 7

initStatic__CardinalFunction · 0.45
initStatic__FundamentalFunction · 0.45
initStatic__AriaFunction · 0.45
initStatic__surgextFunction · 0.45

Calls 1

json_object_getFunction · 0.85

Tested by

no test coverage detected