From a391296c17ca18417f8ccbf58c00230eb6e0cddc Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 2 Nov 2014 17:53:46 -0800 Subject: [PATCH] Small optimization to func/var import. Should compare the nid first, of course, faster and less likely to match anyway. --- Core/HLE/sceKernelModule.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index bb12265f8c..2a542f4709 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -114,7 +114,7 @@ struct VarSymbolImport { struct VarSymbolExport { bool Matches(const VarSymbolImport &other) const { - return !strncmp(moduleName, other.moduleName, KERNELOBJECT_MAX_NAME_LENGTH) && nid == other.nid; + return nid == other.nid && !strncmp(moduleName, other.moduleName, KERNELOBJECT_MAX_NAME_LENGTH); } char moduleName[KERNELOBJECT_MAX_NAME_LENGTH + 1]; @@ -130,7 +130,7 @@ struct FuncSymbolImport { struct FuncSymbolExport { bool Matches(const FuncSymbolImport &other) const { - return !strncmp(moduleName, other.moduleName, KERNELOBJECT_MAX_NAME_LENGTH) && nid == other.nid; + return nid == other.nid && !strncmp(moduleName, other.moduleName, KERNELOBJECT_MAX_NAME_LENGTH); } char moduleName[KERNELOBJECT_MAX_NAME_LENGTH + 1];