Changes in src/verbose.cpp [6ac7ee:ce5ac3]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/verbose.cpp
r6ac7ee rce5ac3 7 7 ostream& Verbose::print (ostream &ost) const 8 8 { 9 10 11 12 9 for (int i=Verbosity;i--;) 10 ost.put('\t'); 11 //cout << "Verbose(.) called." << endl; 12 return ost; 13 13 }; 14 14 … … 22 22 ostream& operator<<(ostream& ost,const Verbose& m) 23 23 { 24 24 return m.print(ost); 25 25 }; 26 26 … … 33 33 ostream& Binary::print (ostream &ost) const 34 34 { 35 36 37 38 39 40 41 42 43 44 45 46 35 int bits = 1, counter = 1; 36 while ((bits = 1 << counter) < BinaryNumber) 37 counter++; 38 for (int i=0;i<counter-1;i++) { 39 if ((BinaryNumber & (1 << i)) == 0) 40 ost.put('0'); 41 else 42 ost.put('1'); 43 } 44 ost.put('b'); 45 //cout << "Binary(.) called." << endl; 46 return ost; 47 47 }; 48 48 … … 56 56 ostream& operator<<(ostream& ost,const Binary& m) 57 57 { 58 58 return m.print(ost); 59 59 };
Note:
See TracChangeset
for help on using the changeset viewer.