Permalink
Browse files

Fix formatting

  • Loading branch information...
1 parent 14b3e10 commit cc531200853eea49b4b7e70cbabf394a9c864c79 @riannucci riannucci committed Nov 30, 2012
Showing with 13 additions and 13 deletions.
  1. +2 −2 src/build_log.cc
  2. +6 −6 src/build_test.cc
  3. +2 −2 src/hash_map.h
  4. +3 −3 src/state.cc
View
@@ -56,7 +56,7 @@ uint64_t MurmurHash64A(const void* key, size_t len) {
uint64_t h = seed ^ (len * m);
const uint64_t * data = (const uint64_t *)key;
const uint64_t * end = data + (len/8);
- while(data != end) {
+ while (data != end) {
uint64_t k = *data++;
k *= m;
k ^= k >> r;
@@ -65,7 +65,7 @@ uint64_t MurmurHash64A(const void* key, size_t len) {
h *= m;
}
const unsigned char* data2 = (const unsigned char*)data;
- switch(len & 7)
+ switch (len & 7)
{
case 7: h ^= uint64_t(data2[6]) << 48;
case 6: h ^= uint64_t(data2[5]) << 40;
View
@@ -240,9 +240,9 @@ TEST_F(PlanTest, PoolsWithDepthTwo) {
"build allTheThings: cat out1 out2 out3 outb1 outb2 outb3\n"
));
// Mark all the out* nodes dirty
- for(int i = 0; i < 3; ++i) {
- GetNode("out"+string(1, '1'+i))->MarkDirty();
- GetNode("outb"+string(1, '1'+i))->MarkDirty();
+ for (int i = 0; i < 3; ++i) {
+ GetNode("out" + string(1, '1' + i))->MarkDirty();
+ GetNode("outb" + string(1, '1' + i))->MarkDirty();
}
GetNode("allTheThings")->MarkDirty();
@@ -252,13 +252,13 @@ TEST_F(PlanTest, PoolsWithDepthTwo) {
// Grab the first 4 edges, out1 out2 outb1 outb2
deque<Edge*> edges;
- for(int i = 0; i < 4; ++i) {
+ for (int i = 0; i < 4; ++i) {
ASSERT_TRUE(plan_.more_to_do());
Edge* edge = plan_.FindWork();
ASSERT_TRUE(edge);
ASSERT_EQ("in", edge->inputs_[0]->path());
string base_name(i < 2 ? "out" : "outb");
- ASSERT_EQ(base_name+string(1, '1'+(i%2)), edge->outputs_[0]->path());
+ ASSERT_EQ(base_name + string(1, '1' + (i % 2)), edge->outputs_[0]->path());
edges.push_back(edge);
}
@@ -288,7 +288,7 @@ TEST_F(PlanTest, PoolsWithDepthTwo) {
ASSERT_FALSE(plan_.FindWork());
- for(deque<Edge*>::iterator it = edges.begin(); it != edges.end(); ++it) {
+ for (deque<Edge*>::iterator it = edges.begin(); it != edges.end(); ++it) {
plan_.EdgeFinished(*it);
}
View
@@ -25,7 +25,7 @@ unsigned int MurmurHash2(const void* key, size_t len) {
const int r = 24;
unsigned int h = seed ^ len;
const unsigned char * data = (const unsigned char *)key;
- while(len >= 4) {
+ while (len >= 4) {
unsigned int k = *(unsigned int *)data;
k *= m;
k ^= k >> r;
@@ -35,7 +35,7 @@ unsigned int MurmurHash2(const void* key, size_t len) {
data += 4;
len -= 4;
}
- switch(len) {
+ switch (len) {
case 3: h ^= data[2] << 16;
case 2: h ^= data[1] << 8;
case 1: h ^= data[0];
View
@@ -39,9 +39,9 @@ void Pool::DelayEdge(Edge* edge) {
}
void Pool::RetrieveReadyEdges(set<Edge*>* ready_queue) {
- while(!delayed_.empty()) {
+ while (!delayed_.empty()) {
Edge* edge = delayed_.front();
- if(current_use_ + edge->weight() > depth_)
+ if (current_use_ + edge->weight() > depth_)
break;
delayed_.pop_front();
ready_queue->insert(edge);
@@ -198,7 +198,7 @@ void State::Dump() {
node->status_known() ? (node->dirty() ? "dirty" : "clean")
: "unknown");
}
- if(!pools_.empty()) {
+ if (!pools_.empty()) {
printf("resource_pools:\n");
for (map<string, Pool*>::const_iterator it = pools_.begin();
it != pools_.end(); ++it)

0 comments on commit cc53120

Please sign in to comment.