| 183 | } |
| 184 | |
| 185 | static void merge_methods(Vector<DocData::MethodDoc> &p_to, const Vector<DocData::MethodDoc> &p_from) { |
| 186 | // Get data from `p_to`, to avoid mutation checks. Searching will be done in the sorted `p_to` from the (potentially) unsorted `p_from`. |
| 187 | DocData::MethodDoc *to_ptrw = p_to.ptrw(); |
| 188 | int64_t to_size = p_to.size(); |
| 189 | |
| 190 | for (const DocData::MethodDoc &from : p_from) { |
| 191 | int64_t found = p_to.span().bisect<MethodCompare>(from, true); |
| 192 | |
| 193 | if (found >= to_size) { |
| 194 | continue; |
| 195 | } |
| 196 | |
| 197 | DocData::MethodDoc &to = to_ptrw[found]; |
| 198 | |
| 199 | // Check found entry on name. |
| 200 | if (to.name == from.name) { |
| 201 | to.description = from.description; |
| 202 | to.is_deprecated = from.is_deprecated; |
| 203 | to.deprecated_message = from.deprecated_message; |
| 204 | to.is_experimental = from.is_experimental; |
| 205 | to.experimental_message = from.experimental_message; |
| 206 | to.keywords = from.keywords; |
| 207 | } |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | static void merge_constants(Vector<DocData::ConstantDoc> &p_to, const Vector<DocData::ConstantDoc> &p_from) { |
| 212 | // Get data from `p_from`, to avoid mutation checks. Searching will be done in the sorted `p_from` from the unsorted `p_to`. |
no test coverage detected