| 318 | } |
| 319 | |
| 320 | bool find_dependency(const std::string& mod_id, size_t& dependency_index) { |
| 321 | auto find_it = dependencies_by_name.find(mod_id); |
| 322 | if (find_it != dependencies_by_name.end()) { |
| 323 | dependency_index = find_it->second; |
| 324 | } |
| 325 | else { |
| 326 | // Handle special dependency names. |
| 327 | if (mod_id == DependencySelf || mod_id == DependencyBaseRecomp) { |
| 328 | add_dependency(mod_id); |
| 329 | dependency_index = dependencies_by_name[mod_id]; |
| 330 | } |
| 331 | else { |
| 332 | return false; |
| 333 | } |
| 334 | } |
| 335 | return true; |
| 336 | } |
| 337 | |
| 338 | size_t find_function_by_vram_section(uint32_t vram, size_t section_index) const { |
| 339 | auto find_it = functions_by_vram.find(vram); |