| 105 | } |
| 106 | |
| 107 | std::vector<std::string> get_renamed_funcs(const toml::table* patches_data) { |
| 108 | std::vector<std::string> renamed_funcs{}; |
| 109 | |
| 110 | // Check if the renamed funcs array exists. |
| 111 | const toml::node_view renamed_funcs_data = (*patches_data)["renamed"]; |
| 112 | |
| 113 | if (renamed_funcs_data.is_array()) { |
| 114 | const toml::array* renamed_funcs_array = renamed_funcs_data.as_array(); |
| 115 | |
| 116 | // Make room for all the renamed funcs in the array. |
| 117 | renamed_funcs.reserve(renamed_funcs_array->size()); |
| 118 | |
| 119 | // Gather the renamed and place them into the array. |
| 120 | renamed_funcs_array->for_each([&renamed_funcs](auto&& el) { |
| 121 | if constexpr (toml::is_string<decltype(el)>) { |
| 122 | renamed_funcs.push_back(*el); |
| 123 | } |
| 124 | }); |
| 125 | } |
| 126 | |
| 127 | return renamed_funcs; |
| 128 | } |
| 129 | |
| 130 | std::vector<N64Recomp::FunctionSize> get_func_sizes(const toml::array* func_sizes_array) { |
| 131 | std::vector<N64Recomp::FunctionSize> func_sizes{}; |