| Index: src/core/SkTHash.h
|
| diff --git a/src/core/SkTHash.h b/src/core/SkTHash.h
|
| index c7917ac668ae5219343972fad621cc59a96c0e6c..b47f8fa766009f5fd455b1a98e06317917dc2a21 100644
|
| --- a/src/core/SkTHash.h
|
| +++ b/src/core/SkTHash.h
|
| @@ -18,6 +18,12 @@ class SkTHashTable : SkNoncopyable {
|
| public:
|
| SkTHashTable() : fCount(0), fCapacity(0) {}
|
|
|
| + // Clear the table.
|
| + void reset() {
|
| + this->~SkTHashTable();
|
| + SkNEW_PLACEMENT(this, SkTHashTable);
|
| + }
|
| +
|
| // How many entries are in the table?
|
| int count() const { return fCount; }
|
|
|
| @@ -144,6 +150,9 @@ class SkTHashMap : SkNoncopyable {
|
| public:
|
| SkTHashMap() {}
|
|
|
| + // Clear the map.
|
| + void reset() { fTable.reset(); }
|
| +
|
| // How many key/value pairs are in the table?
|
| int count() const { return fTable.count(); }
|
|
|
| @@ -187,6 +196,9 @@ class SkTHashSet : SkNoncopyable {
|
| public:
|
| SkTHashSet() {}
|
|
|
| + // Clear the set.
|
| + void reset() { fTable.reset(); }
|
| +
|
| // How many items are in the set?
|
| int count() const { return fTable.count(); }
|
|
|
|
|