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

Side by Side Diff: src/gpu/GrTHashTable.h

Issue 47513017: More Windows 64b compilation warning fixes (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Remove common_variables.gypi from CL (ooops) Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // testing 52 // testing
53 const SkTDArray<T*>& getArray() const { return fSorted; } 53 const SkTDArray<T*>& getArray() const { return fSorted; }
54 SkTDArray<T*>& getArray() { return fSorted; } 54 SkTDArray<T*>& getArray() { return fSorted; }
55 private: 55 private:
56 void clearHash() { sk_bzero(fHash, sizeof(fHash)); } 56 void clearHash() { sk_bzero(fHash, sizeof(fHash)); }
57 57
58 enum { 58 enum {
59 kHashCount = 1 << kHashBits, 59 kHashCount = 1 << kHashBits,
60 kHashMask = kHashCount - 1 60 kHashMask = kHashCount - 1
61 }; 61 };
62 static unsigned hash2Index(uint32_t hash) { 62 static unsigned hash2Index(intptr_t hash) {
bsalomon 2013/10/29 14:40:36 really?
63 hash ^= hash >> 16; 63 hash ^= hash >> 16;
64 if (kHashBits <= 8) { 64 if (kHashBits <= 8) {
65 hash ^= hash >> 8; 65 hash ^= hash >> 8;
66 } 66 }
67 return hash & kHashMask; 67 return hash & kHashMask;
68 } 68 }
69 69
70 mutable T* fHash[kHashCount]; 70 mutable T* fHash[kHashCount];
71 SkTDArray<T*> fSorted; 71 SkTDArray<T*> fSorted;
72 72
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 template <typename T, typename Key, size_t kHashBits> 200 template <typename T, typename Key, size_t kHashBits>
201 bool GrTHashTable<T, Key, kHashBits>::contains(T* elem) const { 201 bool GrTHashTable<T, Key, kHashBits>::contains(T* elem) const {
202 int index = fSorted.find(elem); 202 int index = fSorted.find(elem);
203 return index >= 0; 203 return index >= 0;
204 } 204 }
205 205
206 #endif 206 #endif
207 207
208 #endif 208 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698