Changeset 247 for cpp/frams/util/sstring.cpp
- Timestamp:
- 11/07/14 17:51:01 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/util/sstring.cpp
r226 r247 113 113 // to be moved somewhere else? 114 114 // public domain source: http://isthe.com/chongo/src/fnv 115 typedef u nsigned longFnv32_t;115 typedef uint32_t Fnv32_t; 116 116 117 117 #define FNV_32_PRIME ((Fnv32_t)0x01000193) … … 143 143 ////////////////////////////////////////////////// 144 144 145 u nsigned longSBuf::hash() const145 uint32_t SBuf::hash() const 146 146 { 147 147 return fnv_32a_buf(txt,used,FNV1_32A_INIT); … … 339 339 /////////////////////////////////////// 340 340 341 intSString::equals(const SString& s) const342 { 343 if (s.buf==buf) return 1;344 return !strcmp(buf->txt,s.buf->txt);341 bool SString::equals(const SString& s) const 342 { 343 if (s.buf==buf) return true; 344 return strcmp(buf->txt,s.buf->txt)==0; 345 345 } 346 346
Note: See TracChangeset
for help on using the changeset viewer.