mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 971208 - Eliminate vanilla new in SegmentedVector.h, r=mjrosenb
--HG-- extra : rebase_source : 00761e68f7821f38a46e2442870bf3d214d370f9
This commit is contained in:
parent
adf07b6ec9
commit
5253bae27f
@ -29,6 +29,7 @@
|
||||
#ifndef assembler_wtf_SegmentedVector_h
|
||||
#define assembler_wtf_SegmentedVector_h
|
||||
|
||||
#include "js/Utility.h"
|
||||
#include "js/Vector.h"
|
||||
|
||||
namespace WTF {
|
||||
@ -149,7 +150,7 @@ namespace WTF {
|
||||
}
|
||||
|
||||
if (!segmentExistsFor(m_size - 1))
|
||||
m_segments.append(new Segment);
|
||||
m_segments.append(js_new<Segment>());
|
||||
//segmentFor(m_size - 1)->uncheckedAppend(value);
|
||||
segmentFor(m_size - 1)->append(value);
|
||||
}
|
||||
@ -247,7 +248,7 @@ namespace WTF {
|
||||
{
|
||||
ASSERT(segmentIndex <= m_segments.size());
|
||||
if (segmentIndex == m_segments.size())
|
||||
m_segments.append(new Segment);
|
||||
m_segments.append(js_new<Segment>());
|
||||
m_segments[segmentIndex]->grow(size);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user