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

Unified Diff: include/core/SkTArray.h

Issue 208393006: Have SkTArray explicitly call default constructors. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTArray.h
===================================================================
--- include/core/SkTArray.h (revision 13896)
+++ include/core/SkTArray.h (working copy)
@@ -53,7 +53,7 @@
/** When MEM_COPY is true T will be bit copied when moved.
When MEM_COPY is false, T will be copy constructed / destructed.
- In all cases T's constructor will be called on allocation,
+ In all cases T will be default-initialized on allocation,
and its destructor will be called from this object's destructor.
*/
template <typename T, bool MEM_COPY> class SkTArray {
@@ -173,7 +173,7 @@
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 @@
}
/**
- * 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);
« 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