]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Write a single-line statement in two lines 961/head
authorMatthias Maier <tamiko@43-1.org>
Wed, 27 May 2015 20:11:55 +0000 (22:11 +0200)
committerMatthias Maier <tamiko@43-1.org>
Wed, 27 May 2015 20:11:55 +0000 (22:11 +0200)
include/deal.II/lac/linear_operator.h
include/deal.II/lac/packaged_operation.h

index 6d306e9cc424c30814a81348a61fdf63cf2843a2..e74aa2cf9ae0c7476e3ba26c560c49b7d1ca1766 100644 (file)
@@ -179,7 +179,8 @@ public:
   template <typename Op>
   LinearOperator<Range, Domain> &operator=(const Op &op)
   {
-    return *this = linear_operator<Range, Domain, Op>(op);
+    *this = linear_operator<Range, Domain, Op>(op);
+    return *this;
   }
 
   /**
@@ -237,7 +238,8 @@ public:
   LinearOperator<Range, Domain> &
   operator+=(const LinearOperator<Range, Domain> &second_op)
   {
-    return *this = *this + second_op;
+    *this = *this + second_op;
+    return *this;
   }
 
   /**
@@ -247,7 +249,8 @@ public:
   LinearOperator<Range, Domain> &
   operator-=(const LinearOperator<Range, Domain> &second_op)
   {
-    return *this = *this - second_op;
+    *this = *this - second_op;
+    return *this;
   }
 
   /**
@@ -257,7 +260,8 @@ public:
   LinearOperator<Range, Domain> &
   operator*=(const LinearOperator<Domain, Domain> &second_op)
   {
-    return *this = *this * second_op;
+    *this = *this * second_op;
+    return *this;
   }
 
   /**
@@ -267,7 +271,8 @@ public:
   LinearOperator<Range, Domain>
   operator*=(typename Domain::value_type  number)
   {
-    return *this = *this * number;
+    *this = *this * number;
+    return *this;
   }
 
   //@}
index 13192cce591ce0c90254874553f115fd37c47989..f8a61aa1192feb6a91b366c331052372ca245ce4 100644 (file)
@@ -204,7 +204,8 @@ public:
    */
   PackagedOperation<Range> &operator+=(const PackagedOperation<Range> &second_comp)
   {
-    return *this = *this + second_comp;
+    *this = *this + second_comp;
+    return *this;
   }
 
   /**
@@ -212,7 +213,8 @@ public:
    */
   PackagedOperation<Range> &operator-=(const PackagedOperation<Range> &second_comp)
   {
-    return *this = *this - second_comp;
+    *this = *this - second_comp;
+    return *this;
   }
 
   /**
@@ -221,7 +223,8 @@ public:
    */
   PackagedOperation<Range> &operator+=(const Range &offset)
   {
-    return *this = *this + PackagedOperation<Range>(offset);
+    *this = *this + PackagedOperation<Range>(offset);
+    return *this;
   }
 
   /**
@@ -230,7 +233,8 @@ public:
    */
   PackagedOperation<Range> &operator-=(const Range &offset)
   {
-    return *this = *this - PackagedOperation<Range>(offset);
+    *this = *this - PackagedOperation<Range>(offset);
+    return *this;
   }
 
   /**
@@ -238,7 +242,8 @@ public:
    */
   PackagedOperation<Range> &operator*=(typename Range::value_type number)
   {
-    return *this = *this * number;
+    *this = *this * number;
+    return *this;
   }
   //@}
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.