From e54850e1f2665997eee9fe30173f031c45312185 Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Wed, 2 Dec 2015 14:35:28 -0600 Subject: [PATCH] XThread::set_name - Use more efficient xe::format_string instead of a StringBuffer --- src/xenia/kernel/xthread.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/xenia/kernel/xthread.cc b/src/xenia/kernel/xthread.cc index bfa4a4e72..d9fbd6f48 100644 --- a/src/xenia/kernel/xthread.cc +++ b/src/xenia/kernel/xthread.cc @@ -137,15 +137,12 @@ void XThread::set_last_error(uint32_t error_code) { } void XThread::set_name(const std::string& name) { - StringBuffer buff; - buff.Append(name); - buff.AppendFormat(" (%.8X)", handle()); + name_ = xe::format_string("%s (%.8X)", name, handle()); - name_ = buff.ToString(); if (thread_) { // May be getting set before the thread is created. // One the thread is ready it will handle it. - thread_->set_name(buff.ToString()); + thread_->set_name(name_); } }