~ubuntu-branches/ubuntu/natty/lightning-extension/natty-updates

« back to all changes in this revision

Viewing changes to mozilla/mfbt/HashFunctions.h

  • Committer: Package Import Robot
  • Author(s): Chris Coulson, Chris Coulson, Ben Collins
  • Date: 2012-07-16 14:19:14 UTC
  • mfrom: (3.1.3 natty-security)
  • Revision ID: package-import@ubuntu.com-20120716141914-12y5um8oa26nvh8t
Tags: 1.6+build1-0ubuntu0.11.04.2
* New upstream stable release (CALENDAR_1_6_BUILD1) (LP: #1024564)

[ Chris Coulson <chris.coulson@canonical.com> ]
* Fix LP: #995054 - Ensure the /usr/lib/thunderbird/extensions symlink
  exists on upgrade, which may not be the case when upgrading from a really
  old lightning version
  - add debian/lightning-extension.postinst

[ Ben Collins <bcollins@ubuntu.com> ]
* Fix LP: #1025387 - FTBFS: powerpc build fails
  - add debian/patches/fix-dtoa-build-on-ppc.patch
  - update debian/patches/series

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
static const uint32_t GoldenRatioU32 = 0x9E3779B9U;
59
59
 
60
60
inline uint32_t
61
 
RotateLeft32(uint32_t value, uint8_t bits)
 
61
RotateBitsLeft32(uint32_t value, uint8_t bits)
62
62
{
63
63
  MOZ_ASSERT(bits < 32);
64
64
  return (value << bits) | (value >> (32 - bits));
90
90
   * Otherwise, if |hash| is 0 (as it often is for the beginning of a message),
91
91
   * the expression
92
92
   *
93
 
   *   (GoldenRatioU32 * RotateLeft(hash, 5)) |xor| value
 
93
   *   (GoldenRatioU32 * RotateBitsLeft(hash, 5)) |xor| value
94
94
   *
95
95
   * evaluates to |value|.
96
96
   *
108
108
   * multiplicative effect.  Our golden ratio constant has order 2^29, which is
109
109
   * more than enough for our purposes.)
110
110
   */
111
 
  return GoldenRatioU32 * (RotateLeft32(hash, 5) ^ value);
 
111
  return GoldenRatioU32 * (RotateBitsLeft32(hash, 5) ^ value);
112
112
}
113
113
 
114
114
/**