Formatting

This commit is contained in:
Maschell
2021-09-23 18:38:29 +02:00
parent 30d7e3b7bd
commit 4542bc4d1a
21 changed files with 99 additions and 73 deletions

View File

@@ -18,7 +18,7 @@ bool ModuleDataPersistence::saveModuleData(module_information_t *moduleInformati
DEBUG_FUNCTION_LINE("Saving reloation data for module at %08X", module.getEntrypoint());
// Relocation
std::vector<RelocationData> relocationData = module.getRelocationDataList();
for (auto const &reloc : relocationData) {
for (auto const &reloc: relocationData) {
if (!DynamicLinkingHelper::addRelocationEntry(&(moduleInformation->linking_data), module_data->linking_entries,
DYN_LINK_RELOCATION_LIST_LENGTH, reloc)) {
DEBUG_FUNCTION_LINE("Failed to add relocation entry\n");
@@ -27,9 +27,9 @@ bool ModuleDataPersistence::saveModuleData(module_information_t *moduleInformati
}
std::vector<ExportData> exportData = module.getExportDataList();
for (auto const &curExport : exportData) {
for (auto const &curExport: exportData) {
bool found = false;
for (auto &export_entry : module_data->export_entries) {
for (auto &export_entry: module_data->export_entries) {
if (export_entry.address == 0) {
export_entry.type = curExport.getType();
export_entry.name[0] = '\0';
@@ -46,9 +46,9 @@ bool ModuleDataPersistence::saveModuleData(module_information_t *moduleInformati
}
std::vector<HookData> hookData = module.getHookDataList();
for (auto const &curHook : hookData) {
for (auto const &curHook: hookData) {
bool found = false;
for (auto &hook_entry : module_data->hook_entries) {
for (auto &hook_entry: module_data->hook_entries) {
if (hook_entry.target == 0) {
hook_entry.type = curHook.getType();
hook_entry.target = (uint32_t) curHook.getTarget();
@@ -109,7 +109,7 @@ std::vector<ModuleData> ModuleDataPersistence::loadModuleData(module_information
moduleData.setSkipEntrypoint(module_data->skipEntrypoint);
moduleData.setInitBeforeRelocationDoneHook(module_data->initBeforeRelocationDoneHook);
for (auto &export_entrie : module_data->export_entries) {
for (auto &export_entrie: module_data->export_entries) {
export_data_t *export_entry = &export_entrie;
if (export_entry->address == 0) {
continue;
@@ -117,14 +117,14 @@ std::vector<ModuleData> ModuleDataPersistence::loadModuleData(module_information
moduleData.addExportData(ExportData(static_cast<wums_entry_type_t>(export_entry->type), export_entry->name, reinterpret_cast<const void *>(export_entry->address)));
}
for (auto &hook_entry : module_data->hook_entries) {
for (auto &hook_entry: module_data->hook_entries) {
if (hook_entry.target == 0) {
continue;
}
moduleData.addHookData(HookData(static_cast<wums_hook_type_t>(hook_entry.type), reinterpret_cast<const void *>(hook_entry.target)));
}
for (auto &linking_entry : module_data->linking_entries) {
for (auto &linking_entry: module_data->linking_entries) {
if (linking_entry.destination == nullptr) {
break;
}