From 608bcb1bce41bfc7785b0296c3f598c80efcf3de Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 18 Oct 2010 20:50:38 +0200 Subject: [PATCH] Changed: #1135 Merge changes from Ryzom patch 1.10 (thanks Naush) --- code/ryzom/client/src/interface_v3/chat_window.cpp | 3 ++- code/ryzom/client/src/interface_v3/interface_manager.cpp | 4 ++-- code/ryzom/client/src/interface_v3/people_list.cpp | 6 ++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/chat_window.cpp b/code/ryzom/client/src/interface_v3/chat_window.cpp index 199195ea0..e247c3d53 100644 --- a/code/ryzom/client/src/interface_v3/chat_window.cpp +++ b/code/ryzom/client/src/interface_v3/chat_window.cpp @@ -477,7 +477,8 @@ void CChatWindow::displayLocalPlayerTell(const ucstring &msg, uint numBlinks /*= { cur_time = CInterfaceManager::getTimestampHuman(); } - ucstring csr = CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw()) ? "(CSR) " : ""; + ucstring csr; + if (CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw())) csr += ucstring("(CSR) "); finalMsg += cur_time + csr + CI18N::get("youTell") + ": "; prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," "); encodeColorTag(prop.getRGBA(), finalMsg, true); diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index 65a59a6b4..c332539dd 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -6331,8 +6331,8 @@ char* CInterfaceManager::getTimestampHuman(const char* format /* "[%H:%M:%S] " * bool CInterfaceManager::parseTokens(ucstring& ucstr) { ucstring str = ucstr; - ucstring start_token = "$"; - ucstring end_token = "$"; + ucstring start_token("$"); + ucstring end_token("$"); size_t start_pos = 0; size_t end_pos = 1; diff --git a/code/ryzom/client/src/interface_v3/people_list.cpp b/code/ryzom/client/src/interface_v3/people_list.cpp index 073c42daa..83642687f 100644 --- a/code/ryzom/client/src/interface_v3/people_list.cpp +++ b/code/ryzom/client/src/interface_v3/people_list.cpp @@ -469,7 +469,8 @@ void CPeopleList::displayLocalPlayerTell(uint index,const ucstring &msg,uint num { cur_time = CInterfaceManager::getTimestampHuman(); } - ucstring csr = CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw()) ? "(CSR) " : ""; + ucstring csr; + if (CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw())) csr += ucstring("(CSR) "); ucstring finalMsg = cur_time + csr + CI18N::get("youTell") + ": " + msg; // display msg with good color CInterfaceProperty prop; @@ -939,7 +940,8 @@ class CHandlerContactEntry : public IActionHandler { cur_time = CInterfaceManager::getTimestampHuman(); } - ucstring csr = CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw()) ? "(CSR) " : ""; + ucstring csr; + if (CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw())) csr += ucstring("(CSR) "); final += cur_time + csr + CI18N::get("youTell")+": "; prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," "); CChatWindow::encodeColorTag(prop.getRGBA(), final, true);