Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
9ae4ea68
Commit
9ae4ea68
authored
Sep 10, 2018
by
Mark OLESEN
Browse files
STYLE: operator bool conversion for IOstream (issue
#1001
)
- replaces previous pointer conversion
parent
6f16c677
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/db/IOstreams/IOstreams/IOstream.H
View file @
9ae4ea68
...
...
@@ -181,12 +181,12 @@ public:
// Check
//- Check IOstream status for given operation
//
p
rint IOstream state if error has occured
//- Check IOstream status for given operation
.
//
P
rint IOstream state if error has occur
r
ed
virtual
bool
check
(
const
char
*
operation
)
const
;
//- Check IOstream status for given operation
//
p
rint IOstream state if error has occured and exit
//- Check IOstream status for given operation
.
//
P
rint IOstream state if error has occur
r
ed and exit
void
fatalCheck
(
const
char
*
operation
)
const
;
//- Return true if stream has been opened
...
...
@@ -225,12 +225,10 @@ public:
return
ioState_
&
ios_base
::
badbit
;
}
//- Return
non-zero
if the stream has not failed
operator
void
*
()
const
//- Return
true
if the stream has not failed
explicit
operator
bool
()
const
{
return
fail
()
?
reinterpret_cast
<
void
*>
(
0
)
:
reinterpret_cast
<
void
*>
(
-
1
);
return
!
fail
();
}
//- Return true if the stream has failed
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment