[cfe-commits] [libcxx] r165860 - in /libcxx/trunk/include: chrono fstream functional future regex string vector

Howard Hinnant hhinnant at apple.com
Sat Oct 13 10:47:31 PDT 2012


Thanks Argyrios!  Could you also make yourself an entry in CREDITS.TXT?

Howard

On Oct 12, 2012, at 10:03 PM, Argyrios Kyrtzidis <akyrtzi at gmail.com> wrote:

> Author: akirtzidis
> Date: Fri Oct 12 21:03:45 2012
> New Revision: 165860
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=165860&view=rev
> Log:
> Don't neglect to "return *this".
> 
> Modified:
>    libcxx/trunk/include/chrono
>    libcxx/trunk/include/fstream
>    libcxx/trunk/include/functional
>    libcxx/trunk/include/future
>    libcxx/trunk/include/regex
>    libcxx/trunk/include/string
>    libcxx/trunk/include/vector
> 
> Modified: libcxx/trunk/include/chrono
> URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/chrono?rev=165860&r1=165859&r2=165860&view=diff
> ==============================================================================
> --- libcxx/trunk/include/chrono (original)
> +++ libcxx/trunk/include/chrono Fri Oct 12 21:03:45 2012
> @@ -728,8 +728,8 @@
> 
>     // 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
> 
> 
> Modified: libcxx/trunk/include/fstream
> URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/fstream?rev=165860&r1=165859&r2=165860&view=diff
> ==============================================================================
> --- libcxx/trunk/include/fstream (original)
> +++ libcxx/trunk/include/fstream Fri Oct 12 21:03:45 2012
> @@ -344,6 +344,7 @@
> {
>     close();
>     swap(__rhs);
> +    return *this;
> }
> 
> #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
> 
> Modified: libcxx/trunk/include/functional
> URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/functional?rev=165860&r1=165859&r2=165860&view=diff
> ==============================================================================
> --- libcxx/trunk/include/functional (original)
> +++ libcxx/trunk/include/functional Fri Oct 12 21:03:45 2012
> @@ -1351,6 +1351,7 @@
>         __f_ = __f.__f_;
>         __f.__f_ = 0;
>     }
> +    return *this;
> }
> 
> template<class _Rp, class ..._ArgTypes>
> @@ -1362,6 +1363,7 @@
>     else if (__f_)
>         __f_->destroy_deallocate();
>     __f_ = 0;
> +    return *this;
> }
> 
> template<class _Rp, class ..._ArgTypes>
> 
> Modified: libcxx/trunk/include/future
> URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/future?rev=165860&r1=165859&r2=165860&view=diff
> ==============================================================================
> --- libcxx/trunk/include/future (original)
> +++ libcxx/trunk/include/future Fri Oct 12 21:03:45 2012
> @@ -1872,6 +1872,7 @@
>         __f_ = __f.__f_;
>         __f.__f_ = nullptr;
>     }
> +    return *this;
> }
> 
> template<class _Rp, class ..._ArgTypes>
> 
> Modified: libcxx/trunk/include/regex
> URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/regex?rev=165860&r1=165859&r2=165860&view=diff
> ==============================================================================
> --- libcxx/trunk/include/regex (original)
> +++ libcxx/trunk/include/regex Fri Oct 12 21:03:45 2012
> @@ -2562,6 +2562,7 @@
>         {
>             __member_init(__f);
>             __parse(__first, __last);
> +            return *this;
>         }
> 
> #ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
> 
> Modified: libcxx/trunk/include/string
> URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string?rev=165860&r1=165859&r2=165860&view=diff
> ==============================================================================
> --- libcxx/trunk/include/string (original)
> +++ libcxx/trunk/include/string Fri Oct 12 21:03:45 2012
> @@ -2208,6 +2208,7 @@
>     clear();
>     for (; __first != __last; ++__first)
>         push_back(*__first);
> +    return *this;
> }
> 
> template <class _CharT, class _Traits, class _Allocator>
> 
> Modified: libcxx/trunk/include/vector
> URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/vector?rev=165860&r1=165859&r2=165860&view=diff
> ==============================================================================
> --- libcxx/trunk/include/vector (original)
> +++ libcxx/trunk/include/vector Fri Oct 12 21:03:45 2012
> @@ -2700,6 +2700,7 @@
> {
>     __move_assign(__v, integral_constant<bool,
>           __storage_traits::propagate_on_container_move_assignment::value>());
> +    return *this;
> }
> 
> template <class _Allocator>
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list