Skip to content

Commit a82ce37

Browse files
committed
pretty curlies
1 parent 6b45f8c commit a82ce37

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

inst/include/Rcpp/iostream/Rstreambuf.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,22 +67,18 @@ namespace Rcpp {
6767
}
6868

6969
template <> inline int Rstreambuf<true>::overflow(int c ) {
70-
if (c == traits_type::eof())
71-
return traits_type::eof();
72-
else
73-
{
70+
if (c != traits_type::eof()) {
7471
char_type ch = traits_type::to_char_type(c);
7572
return xsputn(&ch, 1) == 1 ? c : traits_type::eof();
7673
}
74+
return c;
7775
}
7876
template <> inline int Rstreambuf<false>::overflow(int c ) {
79-
if (c == traits_type::eof())
80-
return traits_type::eof();
81-
else
82-
{
77+
if (c != traits_type::eof()) {
8378
char_type ch = traits_type::to_char_type(c);
8479
return xsputn(&ch, 1) == 1 ? c : traits_type::eof();
8580
}
81+
return c;
8682
}
8783

8884
template <> inline int Rstreambuf<true>::sync(){

0 commit comments

Comments
 (0)