From 52678ed1ef1ac42b90935c498ddab1b25ab3e466 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Thu, 21 Aug 2014 21:53:06 -0700 Subject: [PATCH] Removing dead ExportResolver code. --- src/xenia/export_resolver.cc | 30 ------------------------------ src/xenia/export_resolver.h | 6 ------ 2 files changed, 36 deletions(-) diff --git a/src/xenia/export_resolver.cc b/src/xenia/export_resolver.cc index 3cfa87710..9de2a9515 100644 --- a/src/xenia/export_resolver.cc +++ b/src/xenia/export_resolver.cc @@ -29,29 +29,6 @@ void ExportResolver::RegisterTable(const std::string& library_name, } } -uint16_t ExportResolver::GetLibraryOrdinal(const std::string& library_name) { - uint16_t n = 0; - for (const auto& table : tables_) { - if (table.name != library_name) { - return n; - } - ++n; - } - return -1; -} - -KernelExport* ExportResolver::GetExportByOrdinal(const uint16_t library_ordinal, - const uint32_t ordinal) { - const auto& table = tables_[library_ordinal]; - // TODO(benvanik): binary search? - for (size_t n = 0; n < table.count; n++) { - if (table.exports[n].ordinal == ordinal) { - return &table.exports[n]; - } - } - return nullptr; -} - KernelExport* ExportResolver::GetExportByOrdinal( const std::string& library_name, const uint32_t ordinal) { for (const auto& table : tables_) { @@ -68,13 +45,6 @@ KernelExport* ExportResolver::GetExportByOrdinal( return nullptr; } -KernelExport* ExportResolver::GetExportByName(const std::string& library_name, - const std::string& name) { - // TODO(benvanik): lookup by name. - assert_always(); - return nullptr; -} - void ExportResolver::SetVariableMapping(const std::string& library_name, const uint32_t ordinal, uint32_t value) { diff --git a/src/xenia/export_resolver.h b/src/xenia/export_resolver.h index 057c80f37..cf93f7ae4 100644 --- a/src/xenia/export_resolver.h +++ b/src/xenia/export_resolver.h @@ -61,14 +61,8 @@ class ExportResolver { void RegisterTable(const std::string& library_name, KernelExport* exports, const size_t count); - uint16_t GetLibraryOrdinal(const std::string& library_name); - - KernelExport* GetExportByOrdinal(const uint16_t library_ordinal, - const uint32_t ordinal); KernelExport* GetExportByOrdinal(const std::string& library_name, const uint32_t ordinal); - KernelExport* GetExportByName(const std::string& library_name, - const std::string& name); void SetVariableMapping(const std::string& library_name, const uint32_t ordinal, uint32_t value);