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

Unified Diff: src/gpu/GrTHashCache.h

Issue 22850006: Replace uses of GrAssert by SkASSERT. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years, 4 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 | « src/gpu/GrTBSearch.h ('k') | src/gpu/GrTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTHashCache.h
diff --git a/src/gpu/GrTHashCache.h b/src/gpu/GrTHashCache.h
index 6bd58c2dbaf5eef21a4fe5e4110e55407f588c27..01b08e7a0cc3a91793bff06cc89d7de18cb5707b 100644
--- a/src/gpu/GrTHashCache.h
+++ b/src/gpu/GrTHashCache.h
@@ -108,7 +108,7 @@ int GrTHashTable<T, Key, kHashBits>::searchArray(const Key& key) const {
if (Key::EQ(*array[high], key)) {
// above search should have found the first occurrence if there
// are multiple.
- GrAssert(0 == high || Key::LT(*array[high - 1], key));
+ SkASSERT(0 == high || Key::LT(*array[high - 1], key));
return high;
}
@@ -147,7 +147,7 @@ T* GrTHashTable<T, Key, kHashBits>::find(const Key& key, const FindFuncType& fin
// above search should have found the first occurrence if there
// are multiple.
- GrAssert(0 == index || Key::LT(*array[index - 1], key));
+ SkASSERT(0 == index || Key::LT(*array[index - 1], key));
for ( ; index < count() && Key::EQ(*array[index], key); ++index) {
if (findFunc(fSorted[index])) {
@@ -184,14 +184,14 @@ void GrTHashTable<T, Key, kHashBits>::remove(const Key& key, const T* elem) {
// remove from our sorted array
index = this->searchArray(key);
- GrAssert(index >= 0);
+ SkASSERT(index >= 0);
// if there are multiple matches searchArray will give us the first match
// march forward until we find elem.
while (elem != fSorted[index]) {
++index;
- GrAssert(index < fSorted.count());
+ SkASSERT(index < fSorted.count());
}
- GrAssert(elem == fSorted[index]);
+ SkASSERT(elem == fSorted[index]);
fSorted.remove(index);
}
@@ -230,7 +230,7 @@ template <typename T, typename Key, size_t kHashBits>
void GrTHashTable<T, Key, kHashBits>::validate() const {
int count = fSorted.count();
for (int i = 1; i < count; i++) {
- GrAssert(Key::LT(*fSorted[i - 1], *fSorted[i]) ||
+ SkASSERT(Key::LT(*fSorted[i - 1], *fSorted[i]) ||
Key::EQ(*fSorted[i - 1], *fSorted[i]));
}
}
« no previous file with comments | « src/gpu/GrTBSearch.h ('k') | src/gpu/GrTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698