aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hle/service/service.h
diff options
context:
space:
mode:
authorGravatar Lioncash <mathew1800@gmail.com>2014-08-17 23:03:22 -0400
committerGravatar Lioncash <mathew1800@gmail.com>2014-08-17 23:12:20 -0400
commit98fa3f7cba22997aef8ec4d121584c2488389c38 (patch)
tree40585fc835fa8fc27882923a4439d88e7ae171de /src/core/hle/service/service.h
parent68c81f28d947193d050cb04bbcfd42b6ef1307f3 (diff)
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.
Diffstat (limited to 'src/core/hle/service/service.h')
-rw-r--r--src/core/hle/service/service.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h
index dcd52572..cb1ecde3 100644
--- a/src/core/hle/service/service.h
+++ b/src/core/hle/service/service.h
@@ -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();