Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1807)

Unified Diff: Source/wtf/BloomFilter.h

Issue 20300002: Fix trailing whitespace in .cpp, .h, and .idl files (ex. Source/core) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/wtf/BitVector.cpp ('k') | Source/wtf/CheckedArithmetic.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/BloomFilter.h
diff --git a/Source/wtf/BloomFilter.h b/Source/wtf/BloomFilter.h
index 333687d3c237b6db934898d7b20cd576d40f0f46..72f4d66df032c5192b3ff115d11b25aeec095fa3 100644
--- a/Source/wtf/BloomFilter.h
+++ b/Source/wtf/BloomFilter.h
@@ -32,7 +32,7 @@
namespace WTF {
// Counting bloom filter with k=2 and 8 bit counters. Uses 2^keyBits bytes of memory.
-// False positive rate is approximately (1-e^(-2n/m))^2, where n is the number of unique
+// False positive rate is approximately (1-e^(-2n/m))^2, where n is the number of unique
// keys and m is the table size (==2^keyBits).
template <unsigned keyBits>
class BloomFilter {
@@ -42,7 +42,7 @@ public:
static const size_t tableSize = 1 << keyBits;
static const unsigned keyMask = (1 << keyBits) - 1;
static uint8_t maximumCount() { return std::numeric_limits<uint8_t>::max(); }
-
+
BloomFilter() { clear(); }
void add(unsigned hash);
@@ -51,7 +51,7 @@ public:
// The filter may give false positives (claim it may contain a key it doesn't)
// but never false negatives (claim it doesn't contain a key it does).
bool mayContain(unsigned hash) const { return firstSlot(hash) && secondSlot(hash); }
-
+
// The filter must be cleared before reuse even if all keys are removed.
// Otherwise overflowed keys will stick around.
void clear();
@@ -78,7 +78,7 @@ private:
uint8_t m_table[tableSize];
};
-
+
template <unsigned keyBits>
inline void BloomFilter<keyBits>::add(unsigned hash)
{
@@ -103,7 +103,7 @@ inline void BloomFilter<keyBits>::remove(unsigned hash)
if (LIKELY(second < maximumCount()))
--second;
}
-
+
template <unsigned keyBits>
inline void BloomFilter<keyBits>::clear()
{
« no previous file with comments | « Source/wtf/BitVector.cpp ('k') | Source/wtf/CheckedArithmetic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698