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

Function get_stubbed_funcs

src/config.cpp:58–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58std::vector<std::string> get_stubbed_funcs(const toml::table* patches_data) {
59 std::vector<std::string> stubbed_funcs{};
60
61 // Check if the stubs array exists.
62 const toml::node_view stubs_data = (*patches_data)["stubs"];
63
64 if (stubs_data.is_array()) {
65 const toml::array* stubs_array = stubs_data.as_array();
66
67 // Make room for all the stubs in the array.
68 stubbed_funcs.reserve(stubs_array->size());
69
70 // Gather the stubs and place them into the array.
71 stubs_array->for_each([&stubbed_funcs](auto&& el) {
72 if constexpr (toml::is_string<decltype(el)>) {
73 stubbed_funcs.push_back(*el);
74 }
75 else {
76 throw toml::parse_error("Invalid stubbed function", el.source());
77 }
78 });
79 }
80
81 return stubbed_funcs;
82}
83
84std::vector<std::string> get_ignored_funcs(const toml::table* patches_data) {
85 std::vector<std::string> ignored_funcs{};

Callers 1

ConfigMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected