diff --git a/webrtc/system_wrappers/interface/scoped_ptr.h b/webrtc/system_wrappers/interface/scoped_ptr.h index a9ddc5c111..3ca755c075 100644 --- a/webrtc/system_wrappers/interface/scoped_ptr.h +++ b/webrtc/system_wrappers/interface/scoped_ptr.h @@ -567,21 +567,18 @@ class scoped_ptr { template bool operator!=(scoped_ptr const& p2) const; }; -} // namespace webrtc - -// Free functions template -void swap(webrtc::scoped_ptr& p1, webrtc::scoped_ptr& p2) { +void swap(scoped_ptr& p1, scoped_ptr& p2) { p1.swap(p2); } template -bool operator==(T* p1, const webrtc::scoped_ptr& p2) { +bool operator==(T* p1, const scoped_ptr& p2) { return p1 == p2.get(); } template -bool operator!=(T* p1, const webrtc::scoped_ptr& p2) { +bool operator!=(T* p1, const scoped_ptr& p2) { return p1 != p2.get(); } @@ -589,8 +586,10 @@ bool operator!=(T* p1, const webrtc::scoped_ptr& p2) { // Doing e.g. make_scoped_ptr(new FooBarBaz(arg)) is a shorter notation // for scoped_ptr >(new FooBarBaz(arg)) template -webrtc::scoped_ptr make_scoped_ptr(T* ptr) { - return webrtc::scoped_ptr(ptr); +scoped_ptr make_scoped_ptr(T* ptr) { + return scoped_ptr(ptr); } +} // namespace webrtc + #endif // WEBRTC_SYSTEM_WRAPPERS_INTERFACE_SCOPED_PTR_H_