diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-10-13 02:03:45 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-10-13 02:03:45 +0000 |
commit | 88db3171dd5dcc54e3890b6f823c60831fc520a5 (patch) | |
tree | 152ba3680b06c51899bab0a2ad95ea083ef0b976 | |
parent | ce17b0f5b805630bb71f99bfdf820e2c57a34f7e (diff) | |
download | bcm5719-llvm-88db3171dd5dcc54e3890b6f823c60831fc520a5.tar.gz bcm5719-llvm-88db3171dd5dcc54e3890b6f823c60831fc520a5.zip |
Don't neglect to "return *this".
llvm-svn: 165860
-rw-r--r-- | libcxx/include/chrono | 4 | ||||
-rw-r--r-- | libcxx/include/fstream | 1 | ||||
-rw-r--r-- | libcxx/include/functional | 2 | ||||
-rw-r--r-- | libcxx/include/future | 1 | ||||
-rw-r--r-- | libcxx/include/regex | 1 | ||||
-rw-r--r-- | libcxx/include/string | 1 | ||||
-rw-r--r-- | libcxx/include/vector | 1 |
7 files changed, 9 insertions, 2 deletions
diff --git a/libcxx/include/chrono b/libcxx/include/chrono index 3900d59af78..508c1f37757 100644 --- a/libcxx/include/chrono +++ b/libcxx/include/chrono @@ -728,8 +728,8 @@ public: // arithmetic - _LIBCPP_INLINE_VISIBILITY time_point& operator+=(const duration& __d) {__d_ += __d;} - _LIBCPP_INLINE_VISIBILITY time_point& operator-=(const duration& __d) {__d_ -= __d;} + _LIBCPP_INLINE_VISIBILITY time_point& operator+=(const duration& __d) {__d_ += __d; return *this;} + _LIBCPP_INLINE_VISIBILITY time_point& operator-=(const duration& __d) {__d_ -= __d; return *this;} // special values diff --git a/libcxx/include/fstream b/libcxx/include/fstream index 7b6578f1e57..1b8e7a0a5d4 100644 --- a/libcxx/include/fstream +++ b/libcxx/include/fstream @@ -344,6 +344,7 @@ basic_filebuf<_CharT, _Traits>::operator=(basic_filebuf&& __rhs) { close(); swap(__rhs); + return *this; } #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES diff --git a/libcxx/include/functional b/libcxx/include/functional index 8c166b73d64..ec5c5e59333 100644 --- a/libcxx/include/functional +++ b/libcxx/include/functional @@ -1351,6 +1351,7 @@ function<_Rp(_ArgTypes...)>::operator=(function&& __f) _NOEXCEPT __f_ = __f.__f_; __f.__f_ = 0; } + return *this; } template<class _Rp, class ..._ArgTypes> @@ -1362,6 +1363,7 @@ function<_Rp(_ArgTypes...)>::operator=(nullptr_t) _NOEXCEPT else if (__f_) __f_->destroy_deallocate(); __f_ = 0; + return *this; } template<class _Rp, class ..._ArgTypes> diff --git a/libcxx/include/future b/libcxx/include/future index 758296a12f0..39475bd955c 100644 --- a/libcxx/include/future +++ b/libcxx/include/future @@ -1872,6 +1872,7 @@ __packaged_task_function<_Rp(_ArgTypes...)>::operator=(__packaged_task_function& __f_ = __f.__f_; __f.__f_ = nullptr; } + return *this; } template<class _Rp, class ..._ArgTypes> diff --git a/libcxx/include/regex b/libcxx/include/regex index 3918ee0d678..7505f2ea329 100644 --- a/libcxx/include/regex +++ b/libcxx/include/regex @@ -2562,6 +2562,7 @@ public: { __member_init(__f); __parse(__first, __last); + return *this; } #ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS diff --git a/libcxx/include/string b/libcxx/include/string index 7c022dcaf55..89a00e55b4b 100644 --- a/libcxx/include/string +++ b/libcxx/include/string @@ -2208,6 +2208,7 @@ basic_string<_CharT, _Traits, _Allocator>::assign(_InputIterator __first, _Input clear(); for (; __first != __last; ++__first) push_back(*__first); + return *this; } template <class _CharT, class _Traits, class _Allocator> diff --git a/libcxx/include/vector b/libcxx/include/vector index 07859c94e18..ee7143555ca 100644 --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -2700,6 +2700,7 @@ vector<bool, _Allocator>::operator=(vector&& __v) { __move_assign(__v, integral_constant<bool, __storage_traits::propagate_on_container_move_assignment::value>()); + return *this; } template <class _Allocator> |