Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: src/ports/SkOSFile_win.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ports/SkOSFile_posix.cpp ('k') | src/ports/SkRemotableFontMgr_win_dw.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkOSFile.h" 8 #include "SkOSFile.h"
9 9
10 #include "SkTFitsIn.h" 10 #include "SkTFitsIn.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 while (*suffix) { 148 while (*suffix) {
149 dst[i++] = *suffix++; 149 dst[i++] = *suffix++;
150 } 150 }
151 } 151 }
152 dst[i] = 0; 152 dst[i] = 0;
153 SkASSERT(i + 1 <= len + len2); 153 SkASSERT(i + 1 <= len + len2);
154 154
155 return dst; 155 return dst;
156 } 156 }
157 157
158 SkOSFile::Iter::Iter() { 158 SkOSFile::Iter::Iter() { new (fSelf.get()) SkOSFileIterData; }
159 SkNEW_PLACEMENT(fSelf.get(), SkOSFileIterData);
160 }
161 159
162 SkOSFile::Iter::Iter(const char path[], const char suffix[]) { 160 SkOSFile::Iter::Iter(const char path[], const char suffix[]) {
163 SkNEW_PLACEMENT(fSelf.get(), SkOSFileIterData); 161 new (fSelf.get()) SkOSFileIterData;
164 this->reset(path, suffix); 162 this->reset(path, suffix);
165 } 163 }
166 164
167 SkOSFile::Iter::~Iter() { 165 SkOSFile::Iter::~Iter() {
168 SkOSFileIterData& self = *static_cast<SkOSFileIterData*>(fSelf.get()); 166 SkOSFileIterData& self = *static_cast<SkOSFileIterData*>(fSelf.get());
169 sk_free(self.fPath16); 167 sk_free(self.fPath16);
170 if (self.fHandle) { 168 if (self.fHandle) {
171 ::FindClose(self.fHandle); 169 ::FindClose(self.fHandle);
172 } 170 }
173 self.~SkOSFileIterData(); 171 self.~SkOSFileIterData();
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 return false; 233 return false;
236 } 234 }
237 235
238 self.fHandle = ::FindFirstFileW((LPCWSTR)self.fPath16, &data); 236 self.fHandle = ::FindFirstFileW((LPCWSTR)self.fPath16, &data);
239 if (self.fHandle != 0 && self.fHandle != (HANDLE)~0) { 237 if (self.fHandle != 0 && self.fHandle != (HANDLE)~0) {
240 dataPtr = &data; 238 dataPtr = &data;
241 } 239 }
242 } 240 }
243 return self.fHandle != (HANDLE)~0 && get_the_file(self.fHandle, name, dataPt r, getDir); 241 return self.fHandle != (HANDLE)~0 && get_the_file(self.fHandle, name, dataPt r, getDir);
244 } 242 }
OLDNEW
« no previous file with comments | « src/ports/SkOSFile_posix.cpp ('k') | src/ports/SkRemotableFontMgr_win_dw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698