From 6d2c54fdebaf20417a08206ca22770ddfbb9d105 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Wed, 27 May 2015 22:11:55 +0200 Subject: [PATCH] Write a single-line statement in two lines --- include/deal.II/lac/linear_operator.h | 15 ++++++++++----- include/deal.II/lac/packaged_operation.h | 15 ++++++++++----- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/include/deal.II/lac/linear_operator.h b/include/deal.II/lac/linear_operator.h index 6d306e9cc4..e74aa2cf9a 100644 --- a/include/deal.II/lac/linear_operator.h +++ b/include/deal.II/lac/linear_operator.h @@ -179,7 +179,8 @@ public: template LinearOperator &operator=(const Op &op) { - return *this = linear_operator(op); + *this = linear_operator(op); + return *this; } /** @@ -237,7 +238,8 @@ public: LinearOperator & operator+=(const LinearOperator &second_op) { - return *this = *this + second_op; + *this = *this + second_op; + return *this; } /** @@ -247,7 +249,8 @@ public: LinearOperator & operator-=(const LinearOperator &second_op) { - return *this = *this - second_op; + *this = *this - second_op; + return *this; } /** @@ -257,7 +260,8 @@ public: LinearOperator & operator*=(const LinearOperator &second_op) { - return *this = *this * second_op; + *this = *this * second_op; + return *this; } /** @@ -267,7 +271,8 @@ public: LinearOperator operator*=(typename Domain::value_type number) { - return *this = *this * number; + *this = *this * number; + return *this; } //@} diff --git a/include/deal.II/lac/packaged_operation.h b/include/deal.II/lac/packaged_operation.h index 13192cce59..f8a61aa119 100644 --- a/include/deal.II/lac/packaged_operation.h +++ b/include/deal.II/lac/packaged_operation.h @@ -204,7 +204,8 @@ public: */ PackagedOperation &operator+=(const PackagedOperation &second_comp) { - return *this = *this + second_comp; + *this = *this + second_comp; + return *this; } /** @@ -212,7 +213,8 @@ public: */ PackagedOperation &operator-=(const PackagedOperation &second_comp) { - return *this = *this - second_comp; + *this = *this - second_comp; + return *this; } /** @@ -221,7 +223,8 @@ public: */ PackagedOperation &operator+=(const Range &offset) { - return *this = *this + PackagedOperation(offset); + *this = *this + PackagedOperation(offset); + return *this; } /** @@ -230,7 +233,8 @@ public: */ PackagedOperation &operator-=(const Range &offset) { - return *this = *this - PackagedOperation(offset); + *this = *this - PackagedOperation(offset); + return *this; } /** @@ -238,7 +242,8 @@ public: */ PackagedOperation &operator*=(typename Range::value_type number) { - return *this = *this * number; + *this = *this * number; + return *this; } //@} -- 2.39.5