Working on switching to std::string.

This commit is contained in:
Ben Vanik
2014-08-16 02:30:23 -07:00
parent 01f0b14250
commit a4dfc23abc
34 changed files with 211 additions and 250 deletions

View File

@@ -38,7 +38,7 @@ void ExportResolver::RegisterTable(
uint16_t ExportResolver::GetLibraryOrdinal(const char* library_name) {
uint16_t n = 0;
for (auto it = tables_.begin(); it != tables_.end(); ++it, n++) {
if (!xestrcmpa(library_name, it->name)) {
if (!strcmp(library_name, it->name)) {
return n;
}
}
@@ -61,7 +61,7 @@ KernelExport* ExportResolver::GetExportByOrdinal(const char* library_name,
const uint32_t ordinal) {
for (std::vector<ExportTable>::iterator it = tables_.begin();
it != tables_.end(); ++it) {
if (!xestrcmpa(library_name, it->name)) {
if (!strcmp(library_name, it->name)) {
// TODO(benvanik): binary search?
for (size_t n = 0; n < it->count; n++) {
if (it->exports[n].ordinal == ordinal) {