CHECK -> SKTDYNAMICHASH_CHECK, to avoid collision with CHECK in Chrome logging.

BUG=
R=robertphillips@google.com

Review URL: https://codereview.chromium.org/23172014

git-svn-id: http://skia.googlecode.com/svn/trunk@10827 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
mtklein@google.com 2013-08-20 17:03:02 +00:00
parent 2cc0b47a9b
commit ba0ca99b83

View File

@ -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;
}