MCPcopy Create free account
hub / github.com/N64Recomp/N64Recomp / get_renamed_funcs

Function get_renamed_funcs

src/config.cpp:107–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107std::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
130std::vector<N64Recomp::FunctionSize> get_func_sizes(const toml::array* func_sizes_array) {
131 std::vector<N64Recomp::FunctionSize> func_sizes{};

Callers 1

ConfigMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected