summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-27 13:26:05 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-27 13:26:05 -0800
commiteeb30616f601a8e75403d7eb8ffed272a5915a17 (patch)
treecc20a9b6375b2f62af8dc1a91d8c7f8a2267fce9 /indra
parentc69ee5ced1ba3b8e96a08e2f0344eedd971ef3c1 (diff)
CID-99
Checker: INVALIDATE_ITERATOR Function: LLAllocatorHeapProfile::parse(const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&) File: /indra/llcommon/llallocator_heap_profile.cpp not a bug, but make it clearer to coverity.
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llallocator_heap_profile.cpp31
-rw-r--r--indra/newview/lltexturecache.cpp3
2 files changed, 19 insertions, 15 deletions
diff --git a/indra/llcommon/llallocator_heap_profile.cpp b/indra/llcommon/llallocator_heap_profile.cpp
index 0a807702d0..d01b33c8c4 100644
--- a/indra/llcommon/llallocator_heap_profile.cpp
+++ b/indra/llcommon/llallocator_heap_profile.cpp
@@ -113,20 +113,23 @@ 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/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index 7dfd0c83fa..a7f26f1df1 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -1617,7 +1617,8 @@ bool LLTextureCache::writeComplete(handle_t handle, bool abort)
{
lockWorkers();
handle_map_t::iterator iter = mWriters.find(handle);
- if (llverify(iter != mWriters.end()))
+ llassert(iter != mWriters.end());
+ if (iter != mWriters.end())
{
LLTextureCacheWorker* worker = iter->second;
if (worker->complete() || abort)