From d58a856418ba3b3ecdc5e94629c911ec0034dfb1 Mon Sep 17 00:00:00 2001 From: "bungeman@google.com" Date: Mon, 24 Mar 2014 15:55:01 +0000 Subject: [PATCH] Have SkTArray state that it default-initializes. The current comments in SkTArray lead one to believe that it is default constructing all types. However, it is not calling the default constructor for primitive types, it is actually default-initializing. R=bsalomon@google.com Review URL: https://codereview.chromium.org/208393006 git-svn-id: http://skia.googlecode.com/svn/trunk@13909 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/core/SkTArray.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/core/SkTArray.h b/include/core/SkTArray.h index 31bcabae18..6c76c78094 100644 --- a/include/core/SkTArray.h +++ b/include/core/SkTArray.h @@ -53,7 +53,7 @@ template void* operator new(size_t, SkTArray class SkTArray { @@ -173,7 +173,7 @@ public: bool empty() const { return !fCount; } /** - * Adds 1 new default-constructed T value and returns in by reference. Note + * Adds 1 new default-initialized T value and returns it by reference. Note * the reference only remains valid until the next call that adds or removes * elements. */ @@ -193,9 +193,9 @@ public: } /** - * Allocates n more default T values, and returns the address of the start - * of that new range. Note: this address is only valid until the next API - * call made on the array that might add or remove elements. + * Allocates n more default-initialized T values, and returns the address of + * the start of that new range. Note: this address is only valid until the + * next API call made on the array that might add or remove elements. */ T* push_back_n(int n) { SkASSERT(n >= 0);