Commit 53165dbe authored by lrn@chromium.org's avatar lrn@chromium.org

Fix missing retun value.

Why did it ever work?

Review URL: http://codereview.chromium.org/6990035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7988 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a1bcafab
......@@ -183,9 +183,10 @@ class ScopedPointer {
~ScopedPointer() { if (pointer_ != NULL) delete[] pointer_; }
T& operator[](int index) { return pointer_[index]; }
T* operator*() { return pointer_ ;}
T*& operator=(T* new_value) {
T* operator=(T* new_value) {
if (pointer_ != NULL) delete[] pointer_;
pointer_ = new_value;
return new_value;
}
private:
T* pointer_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment