Fix clang++ warnings on -Wtautological-constant-out-of-range-compare

BUG=v8:3730
LOG=N
R=dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25579}
This commit is contained in:
halton.huo 2014-12-01 01:17:24 -08:00 committed by Commit bot
parent b8c667729c
commit 82d0f800a2
2 changed files with 2 additions and 2 deletions

View File

@ -179,7 +179,7 @@ class ElementsAccessor {
// Returns a shared ElementsAccessor for the specified ElementsKind.
static ElementsAccessor* ForKind(ElementsKind elements_kind) {
DCHECK(elements_kind < kElementsKindCount);
DCHECK(static_cast<int>(elements_kind) < kElementsKindCount);
return elements_accessors_[elements_kind];
}

View File

@ -5739,7 +5739,7 @@ class Map: public HeapObject {
inline bool is_prototype_map();
inline void set_elements_kind(ElementsKind elements_kind) {
DCHECK(elements_kind < kElementsKindCount);
DCHECK(static_cast<int>(elements_kind) < kElementsKindCount);
DCHECK(kElementsKindCount <= (1 << Map::ElementsKindBits::kSize));
set_bit_field2(Map::ElementsKindBits::update(bit_field2(), elements_kind));
DCHECK(this->elements_kind() == elements_kind);