Skip to content
GitLab
Menu
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
29c066d2
Commit
29c066d2
authored
Jan 17, 2018
by
Mark Olesen
Browse files
STYLE: avoid redundant eof check in UIPstream (issue
#676
)
parent
17b82e5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/db/IOstreams/Pstreams/UIPstream.C
View file @
29c066d2
...
...
@@ -106,18 +106,17 @@ inline Foam::Istream& Foam::UIPstream::readStringFromBuffer(std::string& str)
size_t
len
;
readFromBuffer
(
len
);
if
(
len
==
0
)
if
(
len
)
{
str
.
clear
();
str
.
assign
(
&
externalBuf_
[
externalBufPosition_
],
len
);
externalBufPosition_
+=
len
;
checkEof
();
}
else
{
str
.
assign
(
&
externalBuf_
[
externalBufPosition_
],
len
);
str
.
clear
(
);
}
externalBufPosition_
+=
len
;
checkEof
();
return
*
this
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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