From 146f0301805c9ee19e3a29935874df1f8797c097 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Mon, 5 Jan 2015 11:28:19 +0100 Subject: [PATCH] Replace 'and' by '&&' and 'or' by '||' On request of Markus Blatt. Supposedly there have been problems with and/or on older compilers. --- dune/istl/basearray.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dune/istl/basearray.hh b/dune/istl/basearray.hh index 88f1c060d..af75ab459 100644 --- a/dune/istl/basearray.hh +++ b/dune/istl/basearray.hh @@ -561,7 +561,7 @@ namespace Dune { B& operator[] (size_type i) { const size_type* lb = std::lower_bound(j, j+n, i); - if (lb == j+n or *lb != i) + if (lb == j+n || *lb != i) DUNE_THROW(ISTLError,"index "<<i<<" not in compressed array"); return p[lb-j]; } @@ -570,7 +570,7 @@ namespace Dune { const B& operator[] (size_type i) const { const size_type* lb = std::lower_bound(j, j+n, i); - if (lb == j+n or *lb != i) + if (lb == j+n || *lb != i) DUNE_THROW(ISTLError,"index "<<i<<" not in compressed array"); return p[lb-j]; } @@ -703,7 +703,7 @@ namespace Dune { iterator find (size_type i) { const size_type* lb = std::lower_bound(j, j+n, i); - return (lb != j+n and *lb == i) + return (lb != j+n && *lb == i) ? iterator(p,j,lb-j) : end(); } @@ -741,7 +741,7 @@ namespace Dune { const_iterator find (size_type i) const { const size_type* lb = std::lower_bound(j, j+n, i); - return (lb != j+n and *lb == i) + return (lb != j+n && *lb == i) ? const_iterator(p,j,lb-j) : end(); } -- GitLab