| 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 | |
| 189 | static void initStatic__Cardinal() |
no test coverage detected