// (The above advice does not apply if you are targeting a 32-bit system.)
//
// Works only for Range<const char*> and Range<char*>
+ //
+ //
+ // ** WANT TO GET RID OF THIS LINT? **
+ //
+ // A) Use a better hash function (*cough*folly::Hash*cough*), but
+ // only if you don't serialize data in a format that depends on
+ // this formula (ie the writer and reader assume this exact hash
+ // function is used).
+ //
+ // B) If you have to use this exact function then make your own hasher
+ // object and copy the body over (see thrift example: D3972362).
+ // https://github.com/facebook/fbthrift/commit/f8ed502e24ab4a32a9d5f266580
+ FOLLY_DEPRECATED("Replace with folly::Hash if the hash is not serialized")
uint32_t hash() const {
// Taken from fbi/nstring.h:
// Quick and dirty bernstein hash...fine for short ascii strings