Skip to content
Snippets Groups Projects
Commit fb7cb2c8 authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

[cleanup] Replace or and not by || and !.

parent 826a38d3
No related branches found
No related tags found
No related merge requests found
......@@ -117,7 +117,7 @@ std::string& ParameterTree::operator[] (const std::string& key)
if (dot != std::string::npos)
{
if (not (hasSub(key.substr(0,dot))))
if (! hasSub(key.substr(0,dot)))
{
subs_[key.substr(0,dot)];
subKeys_.push_back(key.substr(0,dot));
......@@ -127,7 +127,7 @@ std::string& ParameterTree::operator[] (const std::string& key)
}
else
{
if (not (hasKey(key)))
if (! hasKey(key))
valueKeys_.push_back(key);
return values_[key];
}
......@@ -144,7 +144,7 @@ const std::string& ParameterTree::operator[] (const std::string& key) const
}
else
{
if (not (hasKey(key)))
if (! hasKey(key))
DUNE_THROW(Dune::RangeError, "Key '" << key
<< "' not found in ParameterTree (prefix " + prefix_ + ")");
return values_.find(key)->second;
......
......@@ -253,7 +253,7 @@ namespace Dune {
T dummy;
s >> dummy;
// now extraction should have failed, and eof should be set
if(not s.fail() or not s.eof())
if ((! s.fail()) || (! s.eof()))
DUNE_THROW(RangeError, " as a " << className<T>());
return val;
}
......
......@@ -98,13 +98,13 @@ void Dune::ParameterTreeParser::readINITree(std::istream& in,
if (value.length()>0)
{
// handle quoted strings
if ((value[0]=='\'')or (value[0]=='"'))
if ((value[0]=='\'') || (value[0]=='"'))
{
char quote = value[0];
value=value.substr(1);
while (*(rtrim(value).rbegin())!=quote)
{
if (not in.eof())
if (! in.eof())
{
std::string l;
getline(in, l);
......
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