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

Unified Diff: src/core/SkTDynamicHash.h

Issue 23172014: CHECK -> SKTDYNAMICHASH_CHECK, to avoid collision with CHECK in Chrome logging. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTDynamicHash.h
diff --git a/src/core/SkTDynamicHash.h b/src/core/SkTDynamicHash.h
index a40870193eef2e74727f94457a44fa80bb432932..be3dbcca910509556b194c0973dae677ed034d8e 100644
--- a/src/core/SkTDynamicHash.h
+++ b/src/core/SkTDynamicHash.h
@@ -105,11 +105,11 @@ private:
}
bool validate() const {
- #define CHECK(x) SkASSERT((x)); if (!(x)) return false
+ #define SKTDYNAMICHASH_CHECK(x) SkASSERT((x)); if (!(x)) return false
// Is capacity sane?
- CHECK(SkIsPow2(fCapacity));
- CHECK(fCapacity >= kMinCapacity);
+ SKTDYNAMICHASH_CHECK(SkIsPow2(fCapacity));
+ SKTDYNAMICHASH_CHECK(fCapacity >= kMinCapacity);
// Is fCount correct?
int count = 0;
@@ -118,7 +118,7 @@ private:
count++;
}
}
- CHECK(count == fCount);
+ SKTDYNAMICHASH_CHECK(count == fCount);
// Is fDeleted correct?
int deleted = 0;
@@ -127,14 +127,14 @@ private:
deleted++;
}
}
- CHECK(deleted == fDeleted);
+ SKTDYNAMICHASH_CHECK(deleted == fDeleted);
// Are all entries findable?
for (int i = 0; i < fCapacity; i++) {
if (Empty() == fArray[i] || Deleted() == fArray[i]) {
continue;
}
- CHECK(NULL != this->find(GetKey(*fArray[i])));
+ SKTDYNAMICHASH_CHECK(NULL != this->find(GetKey(*fArray[i])));
}
// Are all entries unique?
@@ -146,12 +146,12 @@ private:
if (Empty() == fArray[j] || Deleted() == fArray[j]) {
continue;
}
- CHECK(fArray[i] != fArray[j]);
- CHECK(!Equal(*fArray[i], GetKey(*fArray[j])));
- CHECK(!Equal(*fArray[j], GetKey(*fArray[i])));
+ SKTDYNAMICHASH_CHECK(fArray[i] != fArray[j]);
+ SKTDYNAMICHASH_CHECK(!Equal(*fArray[i], GetKey(*fArray[j])));
+ SKTDYNAMICHASH_CHECK(!Equal(*fArray[j], GetKey(*fArray[i])));
}
}
- #undef CHECK
+ #undef SKTDYNAMICHASH_CHECK
return true;
}
« 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