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

Side by Side Diff: include/core/SkTemplates.h

Issue 21352003: Remove a stray double assign that g++ 4.8 thinks has ill-defined sequencing. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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 | « no previous file | no next file » | 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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkTemplates_DEFINED 10 #ifndef SkTemplates_DEFINED
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 } 316 }
317 317
318 /** Resize the memory area pointed to by the current ptr preserving contents . */ 318 /** Resize the memory area pointed to by the current ptr preserving contents . */
319 void realloc(size_t count) { 319 void realloc(size_t count) {
320 fPtr = reinterpret_cast<T*>(sk_realloc_throw(fPtr, count * sizeof(T))); 320 fPtr = reinterpret_cast<T*>(sk_realloc_throw(fPtr, count * sizeof(T)));
321 } 321 }
322 322
323 /** Resize the memory area pointed to by the current ptr without preserving contents. */ 323 /** Resize the memory area pointed to by the current ptr without preserving contents. */
324 void reset(size_t count) { 324 void reset(size_t count) {
325 sk_free(fPtr); 325 sk_free(fPtr);
326 fPtr = fPtr = (T*)sk_malloc_flags(count * sizeof(T), SK_MALLOC_THROW | S K_MALLOC_TEMP); 326 fPtr = (T*)sk_malloc_flags(count * sizeof(T), SK_MALLOC_THROW | SK_MALLO C_TEMP);
327 } 327 }
328 328
329 T* get() const { return fPtr; } 329 T* get() const { return fPtr; }
330 330
331 operator T*() { 331 operator T*() {
332 return fPtr; 332 return fPtr;
333 } 333 }
334 334
335 operator const T*() const { 335 operator const T*() const {
336 return fPtr; 336 return fPtr;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 /** 448 /**
449 * Returns void* because this object does not initialize the 449 * Returns void* because this object does not initialize the
450 * memory. Use placement new for types that require a cons. 450 * memory. Use placement new for types that require a cons.
451 */ 451 */
452 void* get() { return fStorage.get(); } 452 void* get() { return fStorage.get(); }
453 private: 453 private:
454 SkAlignedSStorage<sizeof(T)*N> fStorage; 454 SkAlignedSStorage<sizeof(T)*N> fStorage;
455 }; 455 };
456 456
457 #endif 457 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698