diff --git a/src/config.cpp b/src/config.cpp index e8c3369..4fb2a3f 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -48,7 +48,7 @@ std::vector get_stubbed_funcs(const toml::table* patches_data) { stubbed_funcs.push_back(*el); } else { - throw toml::parse_error{ "Invalid stubbed function", el.source()}; + throw toml::parse_error("Invalid stubbed function", el.source()); } }); } @@ -196,7 +196,6 @@ std::vector get_instruction_patches(const toml::ta const toml::table& cur_patch = *el.as_table(); // Get the vram and make sure it's 4-byte aligned. - auto testval = cur_patch["vram"]; std::optional vram = cur_patch["vram"].value(); std::optional func_name = cur_patch["func"].value(); std::optional value = cur_patch["value"].value(); @@ -484,8 +483,6 @@ bool RecompPort::Context::from_symbol_file(const std::filesystem::path& symbol_f const toml::array* relocs_array = relocs_value.as_array(); relocs_array->for_each([&ret, &rom, §ion, section_index](auto&& reloc_el) { if constexpr (toml::is_table) { - size_t reloc_index = ret.functions.size(); - std::optional vram = reloc_el["vram"].template value(); std::optional target_vram = reloc_el["target_vram"].template value(); std::optional type_string = reloc_el["type"].template value(); @@ -508,7 +505,7 @@ bool RecompPort::Context::from_symbol_file(const std::filesystem::path& symbol_f cur_reloc.target_section = section_index; cur_reloc.type = reloc_type; - section.relocs.emplace_back(std::move(cur_reloc)); + section.relocs.emplace_back(cur_reloc); } else { throw toml::parse_error("Invalid reloc entry", reloc_el.source());