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