Ignore:
Timestamp:
11/07/14 17:51:01 (10 years ago)
Author:
Maciej Komosinski
Message:

Sources support both 32-bit and 64-bit, and more compilers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/util/sstring.cpp

    r226 r247  
    113113// to be moved somewhere else?
    114114// public domain source: http://isthe.com/chongo/src/fnv
    115 typedef unsigned long Fnv32_t;
     115typedef uint32_t Fnv32_t;
    116116
    117117#define FNV_32_PRIME ((Fnv32_t)0x01000193)
     
    143143//////////////////////////////////////////////////
    144144
    145 unsigned long SBuf::hash() const
     145uint32_t SBuf::hash() const
    146146{
    147147return fnv_32a_buf(txt,used,FNV1_32A_INIT);
     
    339339///////////////////////////////////////
    340340
    341 int SString::equals(const SString& s) const
    342 {
    343 if (s.buf==buf) return 1;
    344 return !strcmp(buf->txt,s.buf->txt);
     341bool SString::equals(const SString& s) const
     342{
     343if (s.buf==buf) return true;
     344return strcmp(buf->txt,s.buf->txt)==0;
    345345}
    346346
Note: See TracChangeset for help on using the changeset viewer.