From 5365ca157d5cb81c5cba3922036839f3c58e85ba Mon Sep 17 00:00:00 2001
From: bunnei <ericbunnie@gmail.com>
Date: Fri, 6 Jun 2014 00:23:33 -0400
Subject: [PATCH] Kernel: Updated various kernel function "name" arguments to
 be const references.

---
 src/core/hle/kernel/event.cpp | 4 ++--
 src/core/hle/kernel/event.h   | 2 +-
 src/core/hle/kernel/mutex.cpp | 4 ++--
 src/core/hle/kernel/mutex.h   | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/core/hle/kernel/event.cpp b/src/core/hle/kernel/event.cpp
index 72a190f8c..3a522c190 100644
--- a/src/core/hle/kernel/event.cpp
+++ b/src/core/hle/kernel/event.cpp
@@ -139,7 +139,7 @@ Result ClearEvent(Handle handle) {
  * @param name Optional name of event
  * @return Newly created Event object
  */
-Event* CreateEvent(Handle& handle, const ResetType reset_type, const std::string name) {
+Event* CreateEvent(Handle& handle, const ResetType reset_type, const std::string& name) {
     Event* evt = new Event;
 
     handle = Kernel::g_object_pool.Create(evt);
@@ -158,7 +158,7 @@ Event* CreateEvent(Handle& handle, const ResetType reset_type, const std::string
  * @param name Optional name of event
  * @return Handle to newly created Event object
  */
-Handle CreateEvent(const ResetType reset_type, const std::string name) {
+Handle CreateEvent(const ResetType reset_type, const std::string& name) {
     Handle handle;
     Event* evt = CreateEvent(handle, reset_type, name);
     return handle;
diff --git a/src/core/hle/kernel/event.h b/src/core/hle/kernel/event.h
index 3527b01fd..c39b33180 100644
--- a/src/core/hle/kernel/event.h
+++ b/src/core/hle/kernel/event.h
@@ -47,6 +47,6 @@ Result ClearEvent(Handle handle);
  * @param name Optional name of event
  * @return Handle to newly created Event object
  */
-Handle CreateEvent(const ResetType reset_type, const std::string name="Unknown");
+Handle CreateEvent(const ResetType reset_type, const std::string& name="Unknown");
 
 } // namespace
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp
index ee7507edf..a76c8de03 100644
--- a/src/core/hle/kernel/mutex.cpp
+++ b/src/core/hle/kernel/mutex.cpp
@@ -137,7 +137,7 @@ Result ReleaseMutex(Handle handle) {
  * @param name Optional name of mutex
  * @return Pointer to new Mutex object
  */
-Mutex* CreateMutex(Handle& handle, bool initial_locked, const std::string name) {
+Mutex* CreateMutex(Handle& handle, bool initial_locked, const std::string& name) {
     Mutex* mutex = new Mutex;
     handle = Kernel::g_object_pool.Create(mutex);
 
@@ -161,7 +161,7 @@ Mutex* CreateMutex(Handle& handle, bool initial_locked, const std::string name)
  * @param name Optional name of mutex
  * @return Handle to newly created object
  */
-Handle CreateMutex(bool initial_locked, std::string name) {
+Handle CreateMutex(bool initial_locked, const std::string& name) {
     Handle handle;
     Mutex* mutex = CreateMutex(handle, initial_locked, name);
     return handle;
diff --git a/src/core/hle/kernel/mutex.h b/src/core/hle/kernel/mutex.h
index fde5549fa..7d7b5137e 100644
--- a/src/core/hle/kernel/mutex.h
+++ b/src/core/hle/kernel/mutex.h
@@ -23,6 +23,6 @@ Result ReleaseMutex(Handle handle);
  * @param name Optional name of mutex
  * @return Handle to newly created object
  */
-Handle CreateMutex(bool initial_locked, const std::string name="Unknown");
+Handle CreateMutex(bool initial_locked, const std::string& name="Unknown");
 
 } // namespace