Makes gtest wokr on MinGW (by Vlad Losev); removes unused linked_ptr::release() method (by Zhanyong Wan).

This commit is contained in:
zhanyong.wan
2010-10-11 06:28:54 +00:00
parent 9c48242258
commit c18438ca29
5 changed files with 65 additions and 58 deletions

View File

@@ -172,15 +172,6 @@ class linked_ptr {
T* get() const { return value_; }
T* operator->() const { return value_; }
T& operator*() const { return *value_; }
// Release ownership of the pointed object and returns it.
// Sole ownership by this linked_ptr object is required.
T* release() {
bool last = link_.depart();
assert(last);
T* v = value_;
value_ = NULL;
return v;
}
bool operator==(T* p) const { return value_ == p; }
bool operator!=(T* p) const { return value_ != p; }