Don't use std::string for service entrypoint names
This avoids many unecessary allocations of std::string during startup and shutdown, as well as reducing memory usage by an insignificant amount.
This commit is contained in:
parent
b4d766fbb3
commit
d48f7ec7b4
3 changed files with 4 additions and 4 deletions
|
@ -35,7 +35,7 @@ void CallSVC(u32 opcode) {
|
|||
if (info->func) {
|
||||
info->func();
|
||||
} else {
|
||||
ERROR_LOG(HLE, "unimplemented SVC function %s(..)", info->name.c_str());
|
||||
ERROR_LOG(HLE, "unimplemented SVC function %s(..)", info->name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ typedef void (*Func)();
|
|||
struct FunctionDef {
|
||||
u32 id;
|
||||
Func func;
|
||||
std::string name;
|
||||
const char* name;
|
||||
};
|
||||
|
||||
struct ModuleDef {
|
||||
|
|
|
@ -50,7 +50,7 @@ public:
|
|||
struct FunctionInfo {
|
||||
u32 id;
|
||||
Function func;
|
||||
std::string name;
|
||||
const char* name;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -95,7 +95,7 @@ public:
|
|||
}
|
||||
if (itr->second.func == nullptr) {
|
||||
ERROR_LOG(OSHLE, "unimplemented function: port=%s, name=%s",
|
||||
GetPortName().c_str(), itr->second.name.c_str());
|
||||
GetPortName().c_str(), itr->second.name);
|
||||
|
||||
// TODO(bunnei): Hack - ignore error
|
||||
u32* cmd_buff = Service::GetCommandBuffer();
|
||||
|
|
Loading…
Reference in a new issue