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

Method removeModule

plugins/plugins.cpp:1128–1149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1126 }
1127
1128 void removeModule(const char* const slugToRemove) const noexcept
1129 {
1130 json_t* const modules = json_object_get(rootJ, "modules");
1131 DISTRHO_SAFE_ASSERT_RETURN(modules != nullptr,);
1132
1133 size_t i;
1134 json_t* v;
1135 json_array_foreach(modules, i, v)
1136 {
1137 if (json_t* const slug = json_object_get(v, "slug"))
1138 {
1139 if (const char* const value = json_string_value(slug))
1140 {
1141 if (std::strcmp(value, slugToRemove) == 0)
1142 {
1143 json_array_remove(modules, i);
1144 break;
1145 }
1146 }
1147 }
1148 }
1149 }
1150};
1151
1152static void initStatic__Cardinal()

Callers 8

initStatic__CardinalFunction · 0.45
initStatic__AriaFunction · 0.45
initStatic__BaconFunction · 0.45
initStatic__BefacoFunction · 0.45
initStatic__BidooFunction · 0.45
initStatic__JWFunction · 0.45

Calls 1

json_object_getFunction · 0.85

Tested by

no test coverage detected