Ignore:
Timestamp:
11/07/14 17:51:01 (9 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.h

    r198 r247  
    2222// - mutex required to be thread safe
    2323
     24#include <stdint.h>
    2425#include <string.h>
    2526#include <stdlib.h>
     
    4748SBuf();
    4849~SBuf();
    49 unsigned long hash() const; // 32-bit FNV-1 hash -> http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash
     50uint32_t hash() const; // 32-bit FNV-1 hash -> http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash
    5051};
    5152
     
    155156void operator+=(const SString&); ///< append other SString
    156157
    157 int equals(const SString &s) const; ///< TRUE if equal
    158 int operator==(const SString &s) const {return equals(s);} ///< TRUE if equal
    159 int operator!=(const SString &s) const {return !equals(s);}
     158bool equals(const SString &s) const; ///< TRUE if equal
     159bool operator==(const SString &s) const {return equals(s);} ///< TRUE if equal
     160bool operator!=(const SString &s) const {return !equals(s);}
    160161const char* operator()(int p) const {return buf->txt+p;} ///< pointer to p'th character in SString
    161162char operator[](int i) const {return buf->txt[i];} ///< get char like in array
     
    175176int startsWith(const char *pattern) const;
    176177char charAt(int pos) const {return buf->txt[pos];}
    177 unsigned long hash() const {return buf->hash();}
     178uint32_t hash() const {return buf->hash();}
    178179
    179180static SString valueOf(int);
Note: See TracChangeset for help on using the changeset viewer.