mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-11 17:47:56 -05:00
Core: Alter the kernel string functions to use std::string instead of const char*.
Most functions already operate on std::strings. This also removes the need to manually null terminate thread names.
This commit is contained in:
@ -29,7 +29,7 @@ public:
|
||||
* Gets the string port name used by CTROS for the service
|
||||
* @return Port name of service
|
||||
*/
|
||||
const char *GetPortName() const {
|
||||
std::string GetPortName() const {
|
||||
return "APT:U";
|
||||
}
|
||||
};
|
||||
|
@ -23,7 +23,7 @@ public:
|
||||
* Gets the string port name used by CTROS for the service
|
||||
* @return Port name of service
|
||||
*/
|
||||
const char *GetPortName() const {
|
||||
std::string GetPortName() const {
|
||||
return "fs:USER";
|
||||
}
|
||||
};
|
||||
|
@ -137,7 +137,7 @@ public:
|
||||
* Gets the string port name used by CTROS for the service
|
||||
* @return Port name of service
|
||||
*/
|
||||
const char *GetPortName() const {
|
||||
std::string GetPortName() const {
|
||||
return "gsp::Gpu";
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ public:
|
||||
* Gets the string port name used by CTROS for the service
|
||||
* @return Port name of service
|
||||
*/
|
||||
const char *GetPortName() const {
|
||||
std::string GetPortName() const {
|
||||
return "hid:USER";
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ public:
|
||||
* Gets the string port name used by CTROS for the service
|
||||
* @return Port name of service
|
||||
*/
|
||||
const char *GetPortName() const {
|
||||
std::string GetPortName() const {
|
||||
return "ndm:u";
|
||||
}
|
||||
|
||||
|
@ -39,8 +39,8 @@ class Interface : public Kernel::Object {
|
||||
friend class Manager;
|
||||
public:
|
||||
|
||||
const char *GetName() const { return GetPortName(); }
|
||||
const char *GetTypeName() const { return GetPortName(); }
|
||||
std::string GetName() const { return GetPortName(); }
|
||||
std::string GetTypeName() const { return GetPortName(); }
|
||||
|
||||
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Service; }
|
||||
Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Service; }
|
||||
@ -57,7 +57,7 @@ public:
|
||||
* Gets the string name used by CTROS for a service
|
||||
* @return Port name of service
|
||||
*/
|
||||
virtual const char *GetPortName() const {
|
||||
virtual std::string GetPortName() const {
|
||||
return "[UNKNOWN SERVICE PORT]";
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ public:
|
||||
|
||||
if (itr == m_functions.end()) {
|
||||
ERROR_LOG(OSHLE, "unknown/unimplemented function: port=%s, command=0x%08X",
|
||||
GetPortName(), cmd_buff[0]);
|
||||
GetPortName().c_str(), cmd_buff[0]);
|
||||
|
||||
// TODO(bunnei): Hack - ignore error
|
||||
u32* cmd_buff = Service::GetCommandBuffer();
|
||||
@ -95,7 +95,7 @@ public:
|
||||
}
|
||||
if (itr->second.func == nullptr) {
|
||||
ERROR_LOG(OSHLE, "unimplemented function: port=%s, name=%s",
|
||||
GetPortName(), itr->second.name.c_str());
|
||||
GetPortName().c_str(), itr->second.name.c_str());
|
||||
|
||||
// TODO(bunnei): Hack - ignore error
|
||||
u32* cmd_buff = Service::GetCommandBuffer();
|
||||
|
@ -22,7 +22,7 @@ public:
|
||||
* Gets the string name used by CTROS for the service
|
||||
* @return Port name of service
|
||||
*/
|
||||
const char *GetPortName() const {
|
||||
std::string GetPortName() const {
|
||||
return "srv:";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user