aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2016-11-02 17:07:33 -0400
committerGravatar Ben Wagner <bungeman@google.com>2016-11-02 21:30:38 +0000
commit7ecc59610de72043e9b7ebaf1ef45c43425e54fc (patch)
tree25bdd613cc4096d02218308b6648e458737292a9 /src
parentd5def99232f0c66de8da213fff09fa4bcaa9df4d (diff)
Remove SkAutoTDeleteArray
This class is already just an alias for std::unique_ptr<T[]>, so replace all uses with that and delete the class. CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot,Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Debug-ASAN-Trybot Change-Id: I40668d398356a22da071ee791666c7f728b59266 Reviewed-on: https://skia-review.googlesource.com/4362 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src')
-rw-r--r--src/codec/SkBmpCodec.cpp8
-rw-r--r--src/codec/SkBmpMaskCodec.h2
-rw-r--r--src/codec/SkBmpRLECodec.cpp2
-rw-r--r--src/codec/SkBmpRLECodec.h2
-rw-r--r--src/codec/SkBmpStandardCodec.cpp2
-rw-r--r--src/codec/SkBmpStandardCodec.h2
-rw-r--r--src/codec/SkIcoCodec.cpp6
-rw-r--r--src/effects/GrCircleBlurFragmentProcessor.cpp2
-rw-r--r--src/effects/SkBlurMask.cpp2
-rw-r--r--src/effects/SkBlurMaskFilter.cpp2
-rw-r--r--src/effects/SkMergeImageFilter.cpp4
-rw-r--r--src/gpu/GrTessellator.cpp2
-rw-r--r--src/gpu/GrTestUtils.cpp2
-rw-r--r--src/gpu/SkGpuDevice.cpp2
-rw-r--r--src/gpu/SkGr.cpp2
-rw-r--r--src/gpu/effects/GrMatrixConvolutionEffect.cpp2
-rw-r--r--src/gpu/gl/GrGLGpu.cpp2
-rw-r--r--src/gpu/vk/GrVkDescriptorSetManager.cpp2
-rw-r--r--src/image/SkImage_Gpu.cpp2
-rw-r--r--src/ports/SkFontHost_win.cpp2
-rw-r--r--src/sfnt/SkOTUtils.cpp2
-rw-r--r--src/sfnt/SkOTUtils.h2
-rw-r--r--src/views/mac/SkOptionsTableView.mm2
23 files changed, 29 insertions, 29 deletions
diff --git a/src/codec/SkBmpCodec.cpp b/src/codec/SkBmpCodec.cpp
index 18e2be4009..b0ef8ad1d8 100644
--- a/src/codec/SkBmpCodec.cpp
+++ b/src/codec/SkBmpCodec.cpp
@@ -111,7 +111,7 @@ bool SkBmpCodec::ReadHeader(SkStream* stream, bool inIco, SkCodec** codecOut) {
// Bmps embedded in Icos skip the first Bmp header
if (!inIco) {
// Read the first header and the size of the second header
- SkAutoTDeleteArray<uint8_t> hBuffer(new uint8_t[kBmpHeaderBytesPlusFour]);
+ std::unique_ptr<uint8_t[]> hBuffer(new uint8_t[kBmpHeaderBytesPlusFour]);
if (stream->read(hBuffer.get(), kBmpHeaderBytesPlusFour) !=
kBmpHeaderBytesPlusFour) {
SkCodecPrintf("Error: unable to read first bitmap header.\n");
@@ -145,7 +145,7 @@ bool SkBmpCodec::ReadHeader(SkStream* stream, bool inIco, SkCodec** codecOut) {
offset = 0;
// Read the size of the second header
- SkAutoTDeleteArray<uint8_t> hBuffer(new uint8_t[4]);
+ std::unique_ptr<uint8_t[]> hBuffer(new uint8_t[4]);
if (stream->read(hBuffer.get(), 4) != 4) {
SkCodecPrintf("Error: unable to read size of second bitmap header.\n");
return false;
@@ -161,7 +161,7 @@ bool SkBmpCodec::ReadHeader(SkStream* stream, bool inIco, SkCodec** codecOut) {
const uint32_t infoBytesRemaining = infoBytes - 4;
// Read the second header
- SkAutoTDeleteArray<uint8_t> iBuffer(new uint8_t[infoBytesRemaining]);
+ std::unique_ptr<uint8_t[]> iBuffer(new uint8_t[infoBytesRemaining]);
if (stream->read(iBuffer.get(), infoBytesRemaining) != infoBytesRemaining) {
SkCodecPrintf("Error: unable to read second bitmap header.\n");
return false;
@@ -320,7 +320,7 @@ bool SkBmpCodec::ReadHeader(SkStream* stream, bool inIco, SkCodec** codecOut) {
switch (headerType) {
case kInfoV1_BmpHeaderType: {
// The V1 header stores the bit masks after the header
- SkAutoTDeleteArray<uint8_t> mBuffer(new uint8_t[kBmpMaskBytes]);
+ std::unique_ptr<uint8_t[]> mBuffer(new uint8_t[kBmpMaskBytes]);
if (stream->read(mBuffer.get(), kBmpMaskBytes) !=
kBmpMaskBytes) {
SkCodecPrintf("Error: unable to read bit inputMasks.\n");
diff --git a/src/codec/SkBmpMaskCodec.h b/src/codec/SkBmpMaskCodec.h
index cc8af856e8..4cfd4d2531 100644
--- a/src/codec/SkBmpMaskCodec.h
+++ b/src/codec/SkBmpMaskCodec.h
@@ -54,7 +54,7 @@ private:
SkAutoTDelete<SkMasks> fMasks; // owned
SkAutoTDelete<SkMaskSwizzler> fMaskSwizzler;
- SkAutoTDeleteArray<uint8_t> fSrcBuffer;
+ std::unique_ptr<uint8_t[]> fSrcBuffer;
typedef SkBmpCodec INHERITED;
};
diff --git a/src/codec/SkBmpRLECodec.cpp b/src/codec/SkBmpRLECodec.cpp
index dc5d689235..33ba851ec6 100644
--- a/src/codec/SkBmpRLECodec.cpp
+++ b/src/codec/SkBmpRLECodec.cpp
@@ -89,7 +89,7 @@ SkCodec::Result SkBmpRLECodec::onGetPixels(const SkImageInfo& dstInfo,
// Read the color table from the stream
colorBytes = numColorsToRead * fBytesPerColor;
- SkAutoTDeleteArray<uint8_t> cBuffer(new uint8_t[colorBytes]);
+ std::unique_ptr<uint8_t[]> cBuffer(new uint8_t[colorBytes]);
if (stream()->read(cBuffer.get(), colorBytes) != colorBytes) {
SkCodecPrintf("Error: unable to read color table.\n");
return false;
diff --git a/src/codec/SkBmpRLECodec.h b/src/codec/SkBmpRLECodec.h
index c5236a8100..1291e9f617 100644
--- a/src/codec/SkBmpRLECodec.h
+++ b/src/codec/SkBmpRLECodec.h
@@ -99,7 +99,7 @@ private:
const uint32_t fNumColors;
const uint32_t fBytesPerColor;
const uint32_t fOffset;
- SkAutoTDeleteArray<uint8_t> fStreamBuffer;
+ std::unique_ptr<uint8_t[]> fStreamBuffer;
size_t fRLEBytes;
const size_t fOrigRLEBytes;
uint32_t fCurrRLEByte;
diff --git a/src/codec/SkBmpStandardCodec.cpp b/src/codec/SkBmpStandardCodec.cpp
index 7d67d18c8f..2dbb338a07 100644
--- a/src/codec/SkBmpStandardCodec.cpp
+++ b/src/codec/SkBmpStandardCodec.cpp
@@ -88,7 +88,7 @@ SkCodec::Result SkBmpStandardCodec::onGetPixels(const SkImageInfo& dstInfo,
// Read the color table from the stream
colorBytes = numColorsToRead * fBytesPerColor;
- SkAutoTDeleteArray<uint8_t> cBuffer(new uint8_t[colorBytes]);
+ std::unique_ptr<uint8_t[]> cBuffer(new uint8_t[colorBytes]);
if (stream()->read(cBuffer.get(), colorBytes) != colorBytes) {
SkCodecPrintf("Error: unable to read color table.\n");
return false;
diff --git a/src/codec/SkBmpStandardCodec.h b/src/codec/SkBmpStandardCodec.h
index 7039cf7efe..edb88acd0c 100644
--- a/src/codec/SkBmpStandardCodec.h
+++ b/src/codec/SkBmpStandardCodec.h
@@ -90,7 +90,7 @@ private:
const uint32_t fBytesPerColor;
const uint32_t fOffset;
SkAutoTDelete<SkSwizzler> fSwizzler;
- SkAutoTDeleteArray<uint8_t> fSrcBuffer;
+ std::unique_ptr<uint8_t[]> fSrcBuffer;
const bool fIsOpaque;
const bool fInIco;
const size_t fAndMaskRowBytes; // only used for fInIco decodes
diff --git a/src/codec/SkIcoCodec.cpp b/src/codec/SkIcoCodec.cpp
index bfbe91311a..e4fce4c8ec 100644
--- a/src/codec/SkIcoCodec.cpp
+++ b/src/codec/SkIcoCodec.cpp
@@ -40,7 +40,7 @@ SkCodec* SkIcoCodec::NewFromStream(SkStream* stream) {
static const uint32_t kIcoDirEntryBytes = 16;
// Read the directory header
- SkAutoTDeleteArray<uint8_t> dirBuffer(new uint8_t[kIcoDirectoryBytes]);
+ std::unique_ptr<uint8_t[]> dirBuffer(new uint8_t[kIcoDirectoryBytes]);
if (inputStream.get()->read(dirBuffer.get(), kIcoDirectoryBytes) !=
kIcoDirectoryBytes) {
SkCodecPrintf("Error: unable to read ico directory header.\n");
@@ -55,7 +55,7 @@ SkCodec* SkIcoCodec::NewFromStream(SkStream* stream) {
}
// Ensure that we can read all of indicated directory entries
- SkAutoTDeleteArray<uint8_t> entryBuffer(new uint8_t[numImages * kIcoDirEntryBytes]);
+ std::unique_ptr<uint8_t[]> entryBuffer(new uint8_t[numImages * kIcoDirEntryBytes]);
if (inputStream.get()->read(entryBuffer.get(), numImages*kIcoDirEntryBytes) !=
numImages*kIcoDirEntryBytes) {
SkCodecPrintf("Error: unable to read ico directory entries.\n");
@@ -69,7 +69,7 @@ SkCodec* SkIcoCodec::NewFromStream(SkStream* stream) {
uint32_t offset;
uint32_t size;
};
- SkAutoTDeleteArray<Entry> directoryEntries(new Entry[numImages]);
+ std::unique_ptr<Entry[]> directoryEntries(new Entry[numImages]);
// Iterate over directory entries
for (uint32_t i = 0; i < numImages; i++) {
diff --git a/src/effects/GrCircleBlurFragmentProcessor.cpp b/src/effects/GrCircleBlurFragmentProcessor.cpp
index 3e80ef517c..eaa8ba9ac1 100644
--- a/src/effects/GrCircleBlurFragmentProcessor.cpp
+++ b/src/effects/GrCircleBlurFragmentProcessor.cpp
@@ -310,7 +310,7 @@ static GrTexture* create_profile_texture(GrTextureProvider* textureProvider, con
texDesc.fHeight = 1;
texDesc.fConfig = kAlpha_8_GrPixelConfig;
- SkAutoTDeleteArray<uint8_t> profile(nullptr);
+ std::unique_ptr<uint8_t[]> profile(nullptr);
if (useHalfPlaneApprox) {
profile.reset(create_half_plane_profile(kProfileTextureWidth));
} else {
diff --git a/src/effects/SkBlurMask.cpp b/src/effects/SkBlurMask.cpp
index d22881aa9e..ce3c504759 100644
--- a/src/effects/SkBlurMask.cpp
+++ b/src/effects/SkBlurMask.cpp
@@ -769,7 +769,7 @@ bool SkBlurMask::BlurRect(SkScalar sigma, SkMask *dst,
return true;
}
- SkAutoTDeleteArray<uint8_t> profile(ComputeBlurProfile(sigma));
+ std::unique_ptr<uint8_t[]> profile(ComputeBlurProfile(sigma));
size_t dstSize = dst->computeImageSize();
if (0 == dstSize) {
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
index e7f660148a..dcacf82afc 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -959,7 +959,7 @@ GrTexture* GrRectBlurEffect::CreateBlurProfileTexture(GrTextureProvider* texture
GrTexture *blurProfile = textureProvider->findAndRefTextureByUniqueKey(key);
if (!blurProfile) {
- SkAutoTDeleteArray<uint8_t> profile(SkBlurMask::ComputeBlurProfile(sigma));
+ std::unique_ptr<uint8_t[]> profile(SkBlurMask::ComputeBlurProfile(sigma));
blurProfile = textureProvider->createTexture(texDesc, SkBudgeted::kYes, profile.get(), 0);
if (blurProfile) {
diff --git a/src/effects/SkMergeImageFilter.cpp b/src/effects/SkMergeImageFilter.cpp
index 9043620b4c..c2c18acef7 100644
--- a/src/effects/SkMergeImageFilter.cpp
+++ b/src/effects/SkMergeImageFilter.cpp
@@ -82,8 +82,8 @@ sk_sp<SkSpecialImage> SkMergeImageFilter::onFilterImage(SkSpecialImage* source,
SkIRect bounds;
bounds.setEmpty();
- SkAutoTDeleteArray<sk_sp<SkSpecialImage>> inputs(new sk_sp<SkSpecialImage>[inputCount]);
- SkAutoTDeleteArray<SkIPoint> offsets(new SkIPoint[inputCount]);
+ std::unique_ptr<sk_sp<SkSpecialImage>[]> inputs(new sk_sp<SkSpecialImage>[inputCount]);
+ std::unique_ptr<SkIPoint[]> offsets(new SkIPoint[inputCount]);
// Filter all of the inputs.
for (int i = 0; i < inputCount; ++i) {
diff --git a/src/gpu/GrTessellator.cpp b/src/gpu/GrTessellator.cpp
index 7d8db23811..e75e1bbd9f 100644
--- a/src/gpu/GrTessellator.cpp
+++ b/src/gpu/GrTessellator.cpp
@@ -1699,7 +1699,7 @@ Poly* path_to_polys(const SkPath& path, SkScalar tolerance, const SkRect& clipBo
if (SkPath::IsInverseFillType(fillType)) {
contourCnt++;
}
- SkAutoTDeleteArray<Vertex*> contours(new Vertex* [contourCnt]);
+ std::unique_ptr<Vertex*[]> contours(new Vertex* [contourCnt]);
path_to_contours(path, tolerance, clipBounds, contours.get(), alloc, isLinear);
return contours_to_polys(contours.get(), contourCnt, path.getFillType(), path.getBounds(),
diff --git a/src/gpu/GrTestUtils.cpp b/src/gpu/GrTestUtils.cpp
index 20f92f0bb3..704b1281f1 100644
--- a/src/gpu/GrTestUtils.cpp
+++ b/src/gpu/GrTestUtils.cpp
@@ -253,7 +253,7 @@ void TestStyle(SkRandom* random, GrStyle* style) {
sk_sp<SkPathEffect> pe;
if (random->nextBool()) {
int cnt = random->nextRangeU(1, 50) * 2;
- SkAutoTDeleteArray<SkScalar> intervals(new SkScalar[cnt]);
+ std::unique_ptr<SkScalar[]> intervals(new SkScalar[cnt]);
SkScalar sum = 0;
for (int i = 0; i < cnt; i++) {
intervals[i] = random->nextRangeScalar(SkDoubleToScalar(0.01),
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index b49687f2cc..a65d6e8d89 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1605,7 +1605,7 @@ void SkGpuDevice::drawVertices(const SkDraw& draw, SkCanvas::VertexMode vmode,
//number of indices for lines per triangle with kLines
indexCount = triangleCount * 6;
- SkAutoTDeleteArray<uint16_t> lineIndices(new uint16_t[indexCount]);
+ std::unique_ptr<uint16_t[]> lineIndices(new uint16_t[indexCount]);
int i = 0;
while (vertProc(&state)) {
lineIndices[i] = state.f0;
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index 270be46f4e..d0a35b52a2 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -391,7 +391,7 @@ GrTexture* GrGenerateMipMapsAndUploadToTexture(GrContext* ctx, const SkBitmap& b
const bool isMipMapped = mipLevelCount > 1;
desc.fIsMipMapped = isMipMapped;
- SkAutoTDeleteArray<GrMipLevel> texels(new GrMipLevel[mipLevelCount]);
+ std::unique_ptr<GrMipLevel[]> texels(new GrMipLevel[mipLevelCount]);
texels[0].fPixels = pixmap.addr();
texels[0].fRowBytes = pixmap.rowBytes();
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
index a07b67128b..56174973e1 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
@@ -241,7 +241,7 @@ sk_sp<GrFragmentProcessor> GrMatrixConvolutionEffect::TestCreate(GrProcessorTest
int width = d->fRandom->nextRangeU(1, MAX_KERNEL_SIZE);
int height = d->fRandom->nextRangeU(1, MAX_KERNEL_SIZE / width);
SkISize kernelSize = SkISize::Make(width, height);
- SkAutoTDeleteArray<SkScalar> kernel(new SkScalar[width * height]);
+ std::unique_ptr<SkScalar[]> kernel(new SkScalar[width * height]);
for (int i = 0; i < width * height; i++) {
kernel.get()[i] = d->fRandom->nextSScalar1();
}
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 6d50ee29c4..e1ea96540e 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -2484,7 +2484,7 @@ bool GrGLGpu::onReadPixels(GrSurface* surface,
}
if (kAlpha_8_GrPixelConfig == config &&
this->readPixelsSupported(renderTarget, tempConfig)) {
- SkAutoTDeleteArray<uint32_t> temp(new uint32_t[width * height * 4]);
+ std::unique_ptr<uint32_t[]> temp(new uint32_t[width * height * 4]);
if (this->onReadPixels(renderTarget, left, top, width, height, tempConfig, temp.get(),
width*4)) {
uint8_t* dst = reinterpret_cast<uint8_t*>(buffer);
diff --git a/src/gpu/vk/GrVkDescriptorSetManager.cpp b/src/gpu/vk/GrVkDescriptorSetManager.cpp
index 868a5ce96c..d05a11c49f 100644
--- a/src/gpu/vk/GrVkDescriptorSetManager.cpp
+++ b/src/gpu/vk/GrVkDescriptorSetManager.cpp
@@ -180,7 +180,7 @@ void GrVkDescriptorSetManager::DescriptorPoolManager::init(GrVkGpu* gpu,
numSamplers = (uint32_t)visibilities->count();
}
- SkAutoTDeleteArray<VkDescriptorSetLayoutBinding> dsSamplerBindings(
+ std::unique_ptr<VkDescriptorSetLayoutBinding[]> dsSamplerBindings(
new VkDescriptorSetLayoutBinding[numSamplers]);
for (uint32_t i = 0; i < numSamplers; ++i) {
uint32_t visibility;
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index d7bdc9c958..d80b187eaa 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -682,7 +682,7 @@ sk_sp<SkImage> SkImage::MakeFromDeferredTextureImageData(GrContext* context, con
dti->fMipMapLevelData[0].fRowBytes, colorTable.get());
return SkImage::MakeTextureFromPixmap(context, pixmap, budgeted);
} else {
- SkAutoTDeleteArray<GrMipLevel> texels(new GrMipLevel[mipLevelCount]);
+ std::unique_ptr<GrMipLevel[]> texels(new GrMipLevel[mipLevelCount]);
for (int i = 0; i < mipLevelCount; i++) {
texels[i].fPixels = dti->fMipMapLevelData[i].fPixelData;
texels[i].fRowBytes = dti->fMipMapLevelData[i].fRowBytes;
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp
index 380b502a30..19eff6f8f9 100644
--- a/src/ports/SkFontHost_win.cpp
+++ b/src/ports/SkFontHost_win.cpp
@@ -363,7 +363,7 @@ static void populate_glyph_to_unicode(HDC fontHdc, const unsigned glyphCount,
return;
}
- SkAutoTDeleteArray<BYTE> glyphSetBuffer(new BYTE[glyphSetBufferSize]);
+ std::unique_ptr<BYTE[]> glyphSetBuffer(new BYTE[glyphSetBufferSize]);
GLYPHSET* glyphSet =
reinterpret_cast<LPGLYPHSET>(glyphSetBuffer.get());
if (GetFontUnicodeRanges(fontHdc, glyphSet) != glyphSetBufferSize) {
diff --git a/src/sfnt/SkOTUtils.cpp b/src/sfnt/SkOTUtils.cpp
index cb533ff3f2..4d8c023ea4 100644
--- a/src/sfnt/SkOTUtils.cpp
+++ b/src/sfnt/SkOTUtils.cpp
@@ -168,7 +168,7 @@ SkOTUtils::LocalizedStrings_NameTable::CreateForFamilyNames(const SkTypeface& ty
if (0 == nameTableSize) {
return nullptr;
}
- SkAutoTDeleteArray<uint8_t> nameTableData(new uint8_t[nameTableSize]);
+ std::unique_ptr<uint8_t[]> nameTableData(new uint8_t[nameTableSize]);
size_t copied = typeface.getTableData(nameTag, 0, nameTableSize, nameTableData.get());
if (copied != nameTableSize) {
return nullptr;
diff --git a/src/sfnt/SkOTUtils.h b/src/sfnt/SkOTUtils.h
index 1773e69ab6..4708a7bb78 100644
--- a/src/sfnt/SkOTUtils.h
+++ b/src/sfnt/SkOTUtils.h
@@ -61,7 +61,7 @@ struct SkOTUtils {
SkOTTableName::Record::NameID::Predefined::Value* fTypes;
int fTypesCount;
int fTypesIndex;
- SkAutoTDeleteArray<SkOTTableName> fNameTableData;
+ std::unique_ptr<SkOTTableName[]> fNameTableData;
SkOTTableName::Iterator fFamilyNameIter;
};
diff --git a/src/views/mac/SkOptionsTableView.mm b/src/views/mac/SkOptionsTableView.mm
index b4cdbf4119..51d4864833 100644
--- a/src/views/mac/SkOptionsTableView.mm
+++ b/src/views/mac/SkOptionsTableView.mm
@@ -96,7 +96,7 @@
int index = 0, count = 0;
SkOSMenu::FindListItemCount(*item->getEvent(), &count);
NSMutableArray* optionstrs = [[NSMutableArray alloc] initWithCapacity:count];
- SkAutoTDeleteArray<SkString> ada(new SkString[count]);
+ std::unique_ptr<SkString[]> ada(new SkString[count]);
SkString* options = ada.get();
SkOSMenu::FindListItems(*item->getEvent(), options);
for (int i = 0; i < count; ++i)