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

Side by Side Diff: src/pdf/SkTSet.h

Issue 27343002: Second wave of Win64 warning cleanup (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: switched count_glyphs back to int Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/pdf/SkPDFResourceDict.cpp ('k') | src/pipe/SkGPipeWrite.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 2012 Google Inc. 2 * Copyright 2012 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 #ifndef SkTSet_DEFINED 8 #ifndef SkTSet_DEFINED
9 #define SkTSet_DEFINED 9 #define SkTSet_DEFINED
10 10
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 return false; 284 return false;
285 } 285 }
286 if (fOrderedArray->count() == 0) { 286 if (fOrderedArray->count() == 0) {
287 return true; 287 return true;
288 } 288 }
289 289
290 // Copy and sort fOrderedArray, then compare to fSetArray. 290 // Copy and sort fOrderedArray, then compare to fSetArray.
291 // A O(n log n) algorithm is necessary as O(n^2) will choke some GMs. 291 // A O(n log n) algorithm is necessary as O(n^2) will choke some GMs.
292 SkAutoMalloc sortedArray(fOrderedArray->bytes()); 292 SkAutoMalloc sortedArray(fOrderedArray->bytes());
293 T* sortedBase = reinterpret_cast<T*>(sortedArray.get()); 293 T* sortedBase = reinterpret_cast<T*>(sortedArray.get());
294 size_t count = fOrderedArray->count(); 294 int count = fOrderedArray->count();
295 fOrderedArray->copyRange(sortedBase, 0, count); 295 fOrderedArray->copyRange(sortedBase, 0, count);
296 296
297 SkTQSort<T>(sortedBase, sortedBase + count - 1); 297 SkTQSort<T>(sortedBase, sortedBase + count - 1);
298 298
299 for (size_t i = 0; i < count; ++i) { 299 for (int i = 0; i < count; ++i) {
300 if (sortedBase[i] != (*fSetArray)[i]) { 300 if (sortedBase[i] != (*fSetArray)[i]) {
301 return false; 301 return false;
302 } 302 }
303 } 303 }
304 304
305 return true; 305 return true;
306 } 306 }
307 #endif 307 #endif
308 308
309 private: 309 private:
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 } else { 347 } else {
348 *posToInsertSorted = iMin + 1; 348 *posToInsertSorted = iMin + 1;
349 } 349 }
350 } 350 }
351 351
352 return -1; 352 return -1;
353 } 353 }
354 }; 354 };
355 355
356 #endif 356 #endif
OLDNEW
« no previous file with comments | « src/pdf/SkPDFResourceDict.cpp ('k') | src/pipe/SkGPipeWrite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698