Make container classes in SkTemplates.h more consistent
authorcsmartdalton <csmartdalton@google.com>
Thu, 23 Jun 2016 19:55:14 +0000 (12:55 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 23 Jun 2016 19:55:14 +0000 (12:55 -0700)
commitd0e402f99949127624b5c5e6d673a44a71940489
tree519b913cf098fd234e1fd581f77abc3f3a793b7a
parent4d602144a9e7638dee25e91d64bca11d793bb5bf
Make container classes in SkTemplates.h more consistent

Ensures that ".get()" always returns null when a container is empty.
Also ensures consistent assert behavior for array counts.

There are still differences in that the malloc variants take a size_t
and the arrays take an int, and that SkAutoSTMalloc defaults to the
stack-allocated buffer wheras the other containers default to null.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2084213003

Review-Url: https://codereview.chromium.org/2084213003
include/private/SkTemplates.h
tests/TemplatesTest.cpp