diff options
author | Vladimir Marko <vmarko@google.com> | 2015-01-23 11:49:09 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-01-23 11:49:10 +0000 |
commit | d834380c94af85b498560f3b5feae21ef7fab1ed (patch) | |
tree | 5c3a389dd63773d21f3e7e9abdd47c7d3572d1b8 | |
parent | 1ab1502093940ecc03b1be5d5e7e50b69df42165 (diff) | |
parent | 040719630f33019693b5c4d9b573311b2f935c39 (diff) | |
download | art-d834380c94af85b498560f3b5feae21ef7fab1ed.zip art-d834380c94af85b498560f3b5feae21ef7fab1ed.tar.gz art-d834380c94af85b498560f3b5feae21ef7fab1ed.tar.bz2 |
Merge "Fix BitVector::IndexIterator::operator*() to return uint32_t."
-rw-r--r-- | runtime/base/bit_vector-inl.h | 2 | ||||
-rw-r--r-- | runtime/base/bit_vector.h | 2 | ||||
-rw-r--r-- | runtime/base/bit_vector_test.cc | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/runtime/base/bit_vector-inl.h b/runtime/base/bit_vector-inl.h index dc13dd5..39b19e5 100644 --- a/runtime/base/bit_vector-inl.h +++ b/runtime/base/bit_vector-inl.h @@ -29,7 +29,7 @@ inline bool BitVector::IndexIterator::operator==(const IndexIterator& other) con return bit_index_ == other.bit_index_; } -inline int BitVector::IndexIterator::operator*() const { +inline uint32_t BitVector::IndexIterator::operator*() const { DCHECK_LT(bit_index_, BitSize()); return bit_index_; } diff --git a/runtime/base/bit_vector.h b/runtime/base/bit_vector.h index 1e28a27..557a2ec 100644 --- a/runtime/base/bit_vector.h +++ b/runtime/base/bit_vector.h @@ -52,7 +52,7 @@ class BitVector { return !(*this == other); } - int operator*() const; + uint32_t operator*() const; IndexIterator& operator++(); diff --git a/runtime/base/bit_vector_test.cc b/runtime/base/bit_vector_test.cc index 31fd0e7..fe3313d 100644 --- a/runtime/base/bit_vector_test.cc +++ b/runtime/base/bit_vector_test.cc @@ -57,10 +57,10 @@ TEST(BitVector, Test) { BitVector::IndexIterator iterator = bv.Indexes().begin(); EXPECT_TRUE(iterator != bv.Indexes().end()); - EXPECT_EQ(0, *iterator); + EXPECT_EQ(0u, *iterator); ++iterator; EXPECT_TRUE(iterator != bv.Indexes().end()); - EXPECT_EQ(static_cast<int>(kBits - 1), *iterator); + EXPECT_EQ(kBits - 1u, *iterator); ++iterator; EXPECT_TRUE(iterator == bv.Indexes().end()); } |