Skip to content
Snippets Groups Projects
Commit 146f0301 authored by Oliver Sander's avatar Oliver Sander
Browse files

Replace 'and' by '&&' and 'or' by '||'

On request of Markus Blatt.  Supposedly there have been problems with and/or on
older compilers.
parent f5374e8c
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment