Changeset 17264 for trunk/Mars/mcore/checksum.h
- Timestamp:
- 10/18/13 17:52:38 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mcore/checksum.h
r17141 r17264 7 7 8 8 #include <stdint.h> 9 10 namespace std11 {12 9 13 10 class Checksum … … 43 40 return *this; 44 41 } 42 45 43 Checksum operator+(Checksum sum) const 46 44 { … … 60 58 if (len%4>0) 61 59 { 62 ostringstream sout;63 sout << "Length " << len << " not dividable by 4 ." << endl;60 std::ostringstream sout; 61 sout << "Length " << len << " not dividable by 4"; 64 62 65 63 #ifdef __EXCEPTIONS 66 throw runtime_error(sout.str());64 throw std::runtime_error(sout.str()); 67 65 #else 68 66 gLog << ___err___ << "ERROR - " << sout.str() << endl; … … 143 141 } 144 142 145 bool add(const vector<char> &v, bool big_endian = true)143 bool add(const std::vector<char> &v, bool big_endian = true) 146 144 { 147 145 return add(v.data(), v.size(), big_endian); 148 146 } 149 147 150 st ring str(bool complm=true) const151 { 152 st ring rc(16,0);148 std::string str(bool complm=true) const 149 { 150 std::string rc(16,0); 153 151 154 152 const uint8_t exclude[13] = … … 241 239 } 242 240 }; 243 }244 241 245 242 #endif
Note:
See TracChangeset
for help on using the changeset viewer.