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

Argyrios Kyrtzidis akyrtzi at gmail.com
Fri Oct 12 19:03:45 PDT 2012


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>





More information about the cfe-commits mailing list