Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Core Modules
dune-common
Commits
fb7cb2c8
Commit
fb7cb2c8
authored
10 years ago
by
Christoph Grüninger
Browse files
Options
Downloads
Patches
Plain Diff
[cleanup] Replace or and not by || and !.
parent
826a38d3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dune/common/parametertree.cc
+3
-3
3 additions, 3 deletions
dune/common/parametertree.cc
dune/common/parametertree.hh
+1
-1
1 addition, 1 deletion
dune/common/parametertree.hh
dune/common/parametertreeparser.cc
+2
-2
2 additions, 2 deletions
dune/common/parametertreeparser.cc
with
6 additions
and
6 deletions
dune/common/parametertree.cc
+
3
−
3
View file @
fb7cb2c8
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
dune/common/parametertree.hh
+
1
−
1
View file @
fb7cb2c8
...
...
@@ -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
;
}
...
...
This diff is collapsed.
Click to expand it.
dune/common/parametertreeparser.cc
+
2
−
2
View file @
fb7cb2c8
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment