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

Side by Side Diff: src/core/SkTHash.h

Issue 1030883006: SkTHash: add checksum include (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 unified diff | Download patch
« 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 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
1 #ifndef SkTHash_DEFINED 8 #ifndef SkTHash_DEFINED
2 #define SkTHash_DEFINED 9 #define SkTHash_DEFINED
3 10
11 #include "SkChecksum.h"
4 #include "SkTypes.h" 12 #include "SkTypes.h"
5 #include "SkTemplates.h" 13 #include "SkTemplates.h"
6 14
7 // Before trying to use SkTHashTable, look below to see if SkTHashMap or SkTHash Set works for you. 15 // Before trying to use SkTHashTable, look below to see if SkTHashMap or SkTHash Set works for you.
8 // They're easier to use, usually perform the same, and have fewer sharp edges. 16 // They're easier to use, usually perform the same, and have fewer sharp edges.
9 17
10 // T and K are treated as ordinary copyable C++ types. 18 // T and K are treated as ordinary copyable C++ types.
11 // Traits must have: 19 // Traits must have:
12 // - static K GetKey(T) 20 // - static K GetKey(T)
13 // - static uint32_t Hash(K) 21 // - static uint32_t Hash(K)
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 235
228 private: 236 private:
229 struct Traits { 237 struct Traits {
230 static const T& GetKey(const T& item) { return item; } 238 static const T& GetKey(const T& item) { return item; }
231 static uint32_t Hash(const T& item) { return HashT(item); } 239 static uint32_t Hash(const T& item) { return HashT(item); }
232 }; 240 };
233 SkTHashTable<T, T, Traits> fTable; 241 SkTHashTable<T, T, Traits> fTable;
234 }; 242 };
235 243
236 #endif//SkTHash_DEFINED 244 #endif//SkTHash_DEFINED
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