Skip to content

Commit

Permalink
improved pezy#34
Browse files Browse the repository at this point in the history
  • Loading branch information
pezy committed Jun 28, 2015
1 parent d16aa50 commit eb683b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions ch14/ex14_05.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
std::istream& operator>>(std::istream& in, Book& book)
{
in >> book.no_ >> book.name_ >> book.author_ >> book.pubdate_;
if(!in)
book=Book();
if (!in) book = Book();
return in;
}

Expand Down
1 change: 1 addition & 0 deletions ch14/ex14_15.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ std::istream& operator>>(std::istream& in, Book& book)
{
in >> book.no_ >> book.name_ >> book.author_ >> book.pubdate_ >>
book.number_;
if (!in) book = Book();
return in;
}

Expand Down

0 comments on commit eb683b6

Please sign in to comment.