diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-02-25 01:09:07 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-02-25 01:09:07 +0000 |
commit | 93d13a8bbcb70bfd80b0d7ae2bf9aedfc06bf0cc (patch) | |
tree | 2b870d231c4e24592a2ea55ef7d94af707bd5e27 /src/gtest-test-part.cc | |
parent | 050a520ddf9a34b93a3b41704fa2450d7450783f (diff) | |
download | gtest-93d13a8bbcb70bfd80b0d7ae2bf9aedfc06bf0cc.tar.gz gtest-93d13a8bbcb70bfd80b0d7ae2bf9aedfc06bf0cc.tar.bz2 gtest-93d13a8bbcb70bfd80b0d7ae2bf9aedfc06bf0cc.tar.xz |
Simplifies the implementation by using std::vector instead of Vector.
git-svn-id: http://googletest.googlecode.com/svn/trunk@377 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'src/gtest-test-part.cc')
-rw-r--r-- | src/gtest-test-part.cc | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/gtest-test-part.cc b/src/gtest-test-part.cc index 4f36df6..7d9adef 100644 --- a/src/gtest-test-part.cc +++ b/src/gtest-test-part.cc @@ -64,19 +64,9 @@ std::ostream& operator<<(std::ostream& os, const TestPartResult& result) { << result.message() << std::endl; } -// Constructs an empty TestPartResultArray. -TestPartResultArray::TestPartResultArray() - : array_(new internal::Vector<TestPartResult>) { -} - -// Destructs a TestPartResultArray. -TestPartResultArray::~TestPartResultArray() { - delete array_; -} - // Appends a TestPartResult to the array. void TestPartResultArray::Append(const TestPartResult& result) { - array_->PushBack(result); + array_.push_back(result); } // Returns the TestPartResult at the given index (0-based). @@ -86,12 +76,12 @@ const TestPartResult& TestPartResultArray::GetTestPartResult(int index) const { internal::posix::Abort(); } - return array_->GetElement(index); + return array_[index]; } // Returns the number of TestPartResult objects in the array. int TestPartResultArray::size() const { - return array_->size(); + return array_.size(); } namespace internal { |