Fix typo in destructor name (#1074)

Itream -> Istream in I.30: Encapsulate rule violations code snippet
This commit is contained in:
Mohit Jain 2017-11-09 23:23:13 +05:30 committed by Sergey Zubkov
parent 8a408d8500
commit 7be6e7daed

View File

@ -2240,7 +2240,7 @@ So, we write a class
Istream() { } Istream() { }
Istream(zstring p) :owned{true}, inp{new ifstream{p}} {} // read from file Istream(zstring p) :owned{true}, inp{new ifstream{p}} {} // read from file
Istream(zstring p, Opt) :owned{true}, inp{new istringstream{p}} {} // read from command line Istream(zstring p, Opt) :owned{true}, inp{new istringstream{p}} {} // read from command line
~Itream() { if (owned) delete inp; } ~Istream() { if (owned) delete inp; }
operator istream& () { return *inp; } operator istream& () { return *inp; }
private: private:
bool owned = false; bool owned = false;