diff -urN farmhash-orig/src/farmhash.cc farmhash/src/farmhash.cc --- farmhash-orig/src/farmhash.cc 2023-06-12 16:17:46.368276854 -0400 +++ farmhash/src/farmhash.cc 2023-06-12 16:17:58.404968718 -0400 @@ -412,7 +412,6 @@ } // namespace NAMESPACE_FOR_HASH_FUNCTIONS -using namespace std; using namespace NAMESPACE_FOR_HASH_FUNCTIONS; namespace farmhashna { #undef Fetch @@ -481,7 +480,7 @@ // Return a 16-byte hash for 48 bytes. Quick and dirty. // Callers do best to use "random-looking" values for a and b. -STATIC_INLINE pair WeakHashLen32WithSeeds( +STATIC_INLINE std::pair WeakHashLen32WithSeeds( uint64_t w, uint64_t x, uint64_t y, uint64_t z, uint64_t a, uint64_t b) { a += w; b = Rotate(b + a + z, 21); @@ -489,11 +488,11 @@ a += x; a += y; b += Rotate(a, 44); - return make_pair(a + z, b + c); + return std::make_pair(a + z, b + c); } // Return a 16-byte hash for s[0] ... s[31], a, and b. Quick and dirty. -STATIC_INLINE pair WeakHashLen32WithSeeds( +STATIC_INLINE std::pair WeakHashLen32WithSeeds( const char* s, uint64_t a, uint64_t b) { return WeakHashLen32WithSeeds(Fetch(s), Fetch(s + 8), @@ -537,8 +536,8 @@ uint64_t x = seed; uint64_t y = seed * k1 + 113; uint64_t z = ShiftMix(y * k2 + 113) * k2; - pair v = make_pair(0, 0); - pair w = make_pair(0, 0); + std::pair v = std::make_pair(0, 0); + std::pair w = std::make_pair(0, 0); x = x * k2 + Fetch(s); // Set end so that after the loop we have 1 to 64 bytes left to process. @@ -610,8 +609,8 @@ uint64_t x = seed0; uint64_t y = seed1 * k2 + 113; uint64_t z = farmhashna::ShiftMix(y * k2) * k2; - pair v = make_pair(seed0, seed1); - pair w = make_pair(0, 0); + std::pair v = std::make_pair(seed0, seed1); + std::pair w = std::make_pair(0, 0); uint64_t u = x - z; x *= k2; uint64_t mul = k2 + (u & 0x82); @@ -1744,7 +1743,7 @@ // Return a 16-byte hash for 48 bytes. Quick and dirty. // Callers do best to use "random-looking" values for a and b. -STATIC_INLINE pair WeakHashLen32WithSeeds( +STATIC_INLINE std::pair WeakHashLen32WithSeeds( uint64_t w, uint64_t x, uint64_t y, uint64_t z, uint64_t a, uint64_t b) { a += w; b = Rotate(b + a + z, 21); @@ -1752,11 +1751,11 @@ a += x; a += y; b += Rotate(a, 44); - return make_pair(a + z, b + c); + return std::make_pair(a + z, b + c); } // Return a 16-byte hash for s[0] ... s[31], a, and b. Quick and dirty. -STATIC_INLINE pair WeakHashLen32WithSeeds( +STATIC_INLINE std::pair WeakHashLen32WithSeeds( const char* s, uint64_t a, uint64_t b) { return WeakHashLen32WithSeeds(Fetch(s), Fetch(s + 8), @@ -1807,7 +1806,7 @@ // We expect len >= 128 to be the common case. Keep 56 bytes of state: // v, w, x, y, and z. - pair v, w; + std::pair v, w; uint64_t x = Uint128Low64(seed); uint64_t y = Uint128High64(seed); uint64_t z = len * k1;