diff options
author | Ychebotarev ProductEngine <ychebotarev@productengine.com> | 2010-01-29 18:01:02 +0200 |
---|---|---|
committer | Ychebotarev ProductEngine <ychebotarev@productengine.com> | 2010-01-29 18:01:02 +0200 |
commit | 675df36965c346f323bb2025cd832a4dc7c9cdce (patch) | |
tree | cd4f950defd428e37340229013502d8d8ee48c88 /indra/llcommon | |
parent | 67d006e404d830931db17814e8da38cc55332152 (diff) | |
parent | 86609394caf1ebb20dd90de37b9af1471ae8aa20 (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/llallocator_heap_profile.cpp | 31 | ||||
-rw-r--r-- | indra/llcommon/llchat.h | 6 | ||||
-rw-r--r-- | indra/llcommon/lldate.cpp | 3 | ||||
-rw-r--r-- | indra/llcommon/llprocessor.cpp | 3 | ||||
-rw-r--r-- | indra/llcommon/llstring.h | 1 | ||||
-rw-r--r-- | indra/llcommon/lluri.cpp | 15 |
6 files changed, 40 insertions, 19 deletions
diff --git a/indra/llcommon/llallocator_heap_profile.cpp b/indra/llcommon/llallocator_heap_profile.cpp index 0a807702d0..e50d59fd4b 100644 --- a/indra/llcommon/llallocator_heap_profile.cpp +++ b/indra/llcommon/llallocator_heap_profile.cpp @@ -113,21 +113,24 @@ void LLAllocatorHeapProfile::parse(std::string const & prof_text) ++j; while(j != line_elems.end() && j->empty()) { ++j; } // skip any separator tokens - llassert_always(j != line_elems.end()); - ++j; // skip the '@' - - mLines.push_back(line(live_count, live_size, tot_count, tot_size)); - line & current_line = mLines.back(); - - for(; j != line_elems.end(); ++j) - { - if(!j->empty()) { - U32 marker = boost::lexical_cast<U32>(*j); - current_line.mTrace.push_back(marker); - } - } + llassert(j != line_elems.end()); + if (j != line_elems.end()) + { + ++j; // skip the '@' + + mLines.push_back(line(live_count, live_size, tot_count, tot_size)); + line & current_line = mLines.back(); + + for(; j != line_elems.end(); ++j) + { + if(!j->empty()) + { + U32 marker = boost::lexical_cast<U32>(*j); + current_line.mTrace.push_back(marker); + } + } + } } - // *TODO - parse MAPPED_LIBRARIES section here if we're ever interested in it } diff --git a/indra/llcommon/llchat.h b/indra/llcommon/llchat.h index 5af7991006..a77bd211f3 100644 --- a/indra/llcommon/llchat.h +++ b/indra/llcommon/llchat.h @@ -79,6 +79,7 @@ public: : mText(text), mFromName(), mFromID(), + mNotifId(), mSourceType(CHAT_SOURCE_AGENT), mChatType(CHAT_TYPE_NORMAL), mAudible(CHAT_AUDIBLE_FULLY), @@ -87,12 +88,14 @@ public: mTimeStr(), mPosAgent(), mURL(), - mChatStyle(CHAT_STYLE_NORMAL) + mChatStyle(CHAT_STYLE_NORMAL), + mSessionID() { } std::string mText; // UTF-8 line of text std::string mFromName; // agent or object name LLUUID mFromID; // agent id or object id + LLUUID mNotifId; EChatSourceType mSourceType; EChatType mChatType; EChatAudible mAudible; @@ -102,6 +105,7 @@ public: LLVector3 mPosAgent; std::string mURL; EChatStyle mChatStyle; + LLUUID mSessionID; }; #endif diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index ca7e471bf2..de7f2ead74 100644 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -152,7 +152,8 @@ void LLDate::toStream(std::ostream& s) const s << '.' << std::setw(2) << (int)(exp_time.tm_usec / (LL_APR_USEC_PER_SEC / 100)); } - s << 'Z'; + s << 'Z' + << std::setfill(' '); } bool LLDate::split(S32 *year, S32 *month, S32 *day, S32 *hour, S32 *min, S32 *sec) const diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index 469e544b16..8a4a4a8f9a 100644 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -281,7 +281,8 @@ bool CProcessor::AnalyzeIntelProcessor() // already have a string here from GetCPUInfo(). JC if ( CPUInfo.uiBrandID < LL_ARRAY_SIZE(INTEL_BRAND) ) { - strcpy(CPUInfo.strBrandID, INTEL_BRAND[CPUInfo.uiBrandID]); + strncpy(CPUInfo.strBrandID, INTEL_BRAND[CPUInfo.uiBrandID], sizeof(CPUInfo.strBrandID)-1); + CPUInfo.strBrandID[sizeof(CPUInfo.strBrandID)-1]='\0'; if (CPUInfo.uiBrandID == 3 && CPUInfo.uiModel == 6) { diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 31e70e0fe4..62cedcde4e 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -882,6 +882,7 @@ void LLStringUtilBase<T>::addCRLF(std::basic_string<T>& string) } string.assign(t, size); + delete[] t; } } diff --git a/indra/llcommon/lluri.cpp b/indra/llcommon/lluri.cpp index f6e8f01f0e..9d4f3a98f0 100644 --- a/indra/llcommon/lluri.cpp +++ b/indra/llcommon/lluri.cpp @@ -46,10 +46,21 @@ void encode_character(std::ostream& ostr, std::string::value_type val) { - ostr << "%" << std::uppercase << std::hex << std::setw(2) << std::setfill('0') + ostr << "%" + + << std::uppercase + << std::hex + << std::setw(2) + << std::setfill('0') + // VWR-4010 Cannot cast to U32 because sign-extension on // chars > 128 will result in FFFFFFC3 instead of F3. - << static_cast<S32>(static_cast<U8>(val)); + << static_cast<S32>(static_cast<U8>(val)) + + // reset stream state + << std::nouppercase + << std::dec + << std::setfill(' '); } // static |