[Lldb-commits] [lldb] r190785 - Fixes a typo that causes Reserve(X) to both re-allocate the container and
Ashok Thirumurthi
ashok.thirumurthi at intel.com
Mon Sep 16 07:17:27 PDT 2013
Author: athirumu
Date: Mon Sep 16 09:17:27 2013
New Revision: 190785
URL: http://llvm.org/viewvc/llvm-project?rev=190785&view=rev
Log:
Fixes a typo that causes Reserve(X) to both re-allocate the container and
change the last index (i.e. to X), which has unintended consequences for
Reserve(X) followed by Append().
Modified:
lldb/trunk/include/lldb/Core/RangeMap.h
Modified: lldb/trunk/include/lldb/Core/RangeMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/RangeMap.h?rev=190785&r1=190784&r2=190785&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/RangeMap.h (original)
+++ lldb/trunk/include/lldb/Core/RangeMap.h Mon Sep 16 09:17:27 2013
@@ -592,7 +592,7 @@ namespace lldb_private {
void
Reserve (typename Collection::size_type size)
{
- m_entries.resize (size);
+ m_entries.reserve (size);
}
bool
More information about the lldb-commits
mailing list