diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-06-26 00:39:00 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-06-26 00:39:00 +0000 |
commit | 25c10ed028da5c547b11f1f461916897272b0e6d (patch) | |
tree | 350a5858f8970b6e28b2dc395625d74d8bd597b2 /indra/newview/lllogchat.cpp | |
parent | 6dd125d375b38455997a0c4b8747659f4c2351aa (diff) |
QAR-628 merge string-cleanup-5 -r 90476:90508 -> release
dataserver-is-deprecated
Diffstat (limited to 'indra/newview/lllogchat.cpp')
-rw-r--r-- | indra/newview/lllogchat.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 76a4ec99b1..cb7af207d2 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -38,14 +38,14 @@ const S32 LOG_RECALL_SIZE = 2048; //static -LLString LLLogChat::makeLogFileName(LLString filename) +std::string LLLogChat::makeLogFileName(std::string filename) { - filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_ACCOUNT_CHAT_LOGS,filename.c_str()); + filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_ACCOUNT_CHAT_LOGS,filename); filename += ".txt"; return filename; } -LLString LLLogChat::timestamp(bool withdate) +std::string LLLogChat::timestamp(bool withdate) { time_t utc_time; utc_time = time_corrected(); @@ -57,7 +57,7 @@ LLString LLLogChat::timestamp(bool withdate) // it's daylight savings time there. timep = utc_to_pacific_time(utc_time, gPacificDaylightTime); - LLString text; + std::string text; if (withdate) text = llformat("[%d/%02d/%02d %d:%02d] ", (timep->tm_year-100)+2000, timep->tm_mon+1, timep->tm_mday, timep->tm_hour, timep->tm_min); else @@ -68,7 +68,7 @@ LLString LLLogChat::timestamp(bool withdate) //static -void LLLogChat::saveHistory(LLString filename, LLString line) +void LLLogChat::saveHistory(std::string filename, std::string line) { if(!filename.size()) { @@ -76,7 +76,7 @@ void LLLogChat::saveHistory(LLString filename, LLString line) return; } - LLFILE* fp = LLFile::fopen(LLLogChat::makeLogFileName(filename).c_str(), "a"); /*Flawfinder: ignore*/ + LLFILE* fp = LLFile::fopen(LLLogChat::makeLogFileName(filename), "a"); /*Flawfinder: ignore*/ if (!fp) { llinfos << "Couldn't open chat history log!" << llendl; @@ -89,19 +89,19 @@ void LLLogChat::saveHistory(LLString filename, LLString line) } } -void LLLogChat::loadHistory(LLString filename , void (*callback)(ELogLineType,LLString,void*), void* userdata) +void LLLogChat::loadHistory(std::string filename , void (*callback)(ELogLineType,std::string,void*), void* userdata) { if(!filename.size()) { llerrs << "Filename is Empty!" << llendl; } - LLFILE* fptr = LLFile::fopen(makeLogFileName(filename).c_str(), "r"); /*Flawfinder: ignore*/ + LLFILE* fptr = LLFile::fopen(makeLogFileName(filename), "r"); /*Flawfinder: ignore*/ if (!fptr) { //LLUIString message = LLFloaterChat::getInstance()->getUIString("IM_logging_string"); //callback(LOG_EMPTY,"IM_logging_string",userdata); - callback(LOG_EMPTY,"",userdata); + callback(LOG_EMPTY,LLStringUtil::null,userdata); return; //No previous conversation with this name. } else @@ -128,14 +128,14 @@ void LLLogChat::loadHistory(LLString filename , void (*callback)(ELogLineType,LL if (!firstline) { - callback(LOG_LINE,buffer,userdata); + callback(LOG_LINE,std::string(buffer),userdata); } else { firstline = FALSE; } } - callback(LOG_END,"",userdata); + callback(LOG_END,LLStringUtil::null,userdata); fclose(fptr); } |