Skip to content

Commit 7df47cd

Browse files
committed
instream: use default member initializers for literals
1 parent d58afc0 commit 7df47cd

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/instream.cc

-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
InStream::InStream(std::string fileName, const bool silent):
2323
fileName_(std::move(fileName)),
2424
silent_(silent),
25-
anyError_(false),
2625
str_((fileName_ == "-")
2726
? std::cin
2827
: fileStr_)
@@ -36,7 +35,6 @@ InStream::InStream(std::string fileName, const bool silent):
3635

3736
InStream::InStream(std::istringstream &str, const bool silent):
3837
silent_(silent),
39-
anyError_(false),
4038
str_(str)
4139
{
4240
}

src/instream.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class InStream {
5252
private:
5353
const std::string fileName_;
5454
const bool silent_;
55-
bool anyError_;
55+
bool anyError_ = false;
5656
std::ifstream fileStr_;
5757
std::istream &str_;
5858
};

0 commit comments

Comments
 (0)