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

Unified Diff: runtime/bin/hashmap_test.cc

Issue 2480793002: clang-format runtime/bin (Closed)
Patch Set: Created 4 years, 1 month 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 | « runtime/bin/gen_snapshot.cc ('k') | runtime/bin/io_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/hashmap_test.cc
diff --git a/runtime/bin/hashmap_test.cc b/runtime/bin/hashmap_test.cc
index 3a741381891fe76847c7e9b667d75cdf0057ee67..47849e046d4bc400e5c03b160f717f483a9071c7 100644
--- a/runtime/bin/hashmap_test.cc
+++ b/runtime/bin/hashmap_test.cc
@@ -19,7 +19,7 @@ typedef uint32_t (*IntKeyHash)(uint32_t key);
class IntSet {
public:
explicit IntSet(IntKeyHash hash)
- : hash_(hash), map_(HashMap::SamePointerValue, kInitialSize) {}
+ : hash_(hash), map_(HashMap::SamePointerValue, kInitialSize) {}
void Insert(int x) {
EXPECT_NE(0, x); // 0 corresponds to (void*)NULL - illegal key value
@@ -43,9 +43,7 @@ class IntSet {
return p != NULL;
}
- void Clear() {
- map_.Clear();
- }
+ void Clear() { map_.Clear(); }
uint32_t occupancy() const {
uint32_t count = 0;
@@ -62,12 +60,24 @@ class IntSet {
};
-static uint32_t WordHash(uint32_t key) { return dart::Utils::WordHash(key); }
-static uint32_t Hash(uint32_t key) { return 23; }
-static uint32_t CollisionHash1(uint32_t key) { return key & 0x3; }
-static uint32_t CollisionHash2(uint32_t key) { return kInitialSize - 1; }
-static uint32_t CollisionHash3(uint32_t key) { return kInitialSize - 2; }
-static uint32_t CollisionHash4(uint32_t key) { return kInitialSize - 2; }
+static uint32_t WordHash(uint32_t key) {
+ return dart::Utils::WordHash(key);
+}
+static uint32_t Hash(uint32_t key) {
+ return 23;
+}
+static uint32_t CollisionHash1(uint32_t key) {
+ return key & 0x3;
+}
+static uint32_t CollisionHash2(uint32_t key) {
+ return kInitialSize - 1;
+}
+static uint32_t CollisionHash3(uint32_t key) {
+ return kInitialSize - 2;
+}
+static uint32_t CollisionHash4(uint32_t key) {
+ return kInitialSize - 2;
+}
void TestSet(IntKeyHash hash, int size) {
« no previous file with comments | « runtime/bin/gen_snapshot.cc ('k') | runtime/bin/io_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698