]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use PointerComparison::equal
authorMatthias Maier <tamiko@43-1.org>
Tue, 5 May 2015 19:59:50 +0000 (21:59 +0200)
committerMatthias Maier <tamiko@43-1.org>
Mon, 11 May 2015 21:05:21 +0000 (23:05 +0200)
include/deal.II/lac/linear_operator.h

index 54654eca144bec0d72f286e51ac0c32ca4e240b1..66f4e6d9e8351689dce57cf344244fcc1719e4c6 100644 (file)
@@ -815,7 +815,7 @@ namespace
     {
       op.vmult = [&matrix](Range &v, const Domain &u)
       {
-        if (static_cast<const void *>(&v) == static_cast<const void *>(&u))
+        if (PointerComparison::equal(&v, &u))
           {
             // If v and u are the same memory location use intermediate storage
             apply_with_intermediate_storage([&matrix](Range &b, const Domain &a)
@@ -842,7 +842,7 @@ namespace
 
       op.Tvmult = [&matrix](Domain &v, const Range &u)
       {
-        if (static_cast<const void *>(&v) == static_cast<const void *>(&u))
+        if (PointerComparison::equal(&v, &u))
           {
             // If v and u are the same memory location use intermediate storage
             apply_with_intermediate_storage([&matrix](Domain &b, const Range &a)
@@ -888,7 +888,7 @@ namespace
 
       op.vmult_add = [&matrix](Range &v, const Domain &u)
       {
-        if (static_cast<const void *>(&v) == static_cast<const void *>(&u))
+        if (PointerComparison::equal(&v, &u))
           {
             apply_with_intermediate_storage([&matrix](Range &b, const Domain &a)
             {
@@ -904,7 +904,7 @@ namespace
 
       op.Tvmult_add = [&matrix](Domain &v, const Range &u)
       {
-        if (static_cast<const void *>(&v) == static_cast<const void *>(&u))
+        if (PointerComparison::equal(&v, &u))
           {
             apply_with_intermediate_storage([&matrix](Domain &b, const Range &a)
             {

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.