Thrift: Cleaned up whitespace.
Summary:
Replaced a lot of tabs with spaces in the thrift codebase.
Removed a lot of trailing whitespace from thrift-generated c++.
Added a few things to cleanup.sh.
Trac Bug: #
Blame Rev:
Reviewed By: mcslee
Test Plan:
Recompiled thrift.
Re-thrifted some test .thrifts.
Compiled the genrated c++.
Ran cleanup.sh.
Revert Plan: ok
Notes:
EImportant:
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665176 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/concurrency/test/Tests.cpp b/lib/cpp/src/concurrency/test/Tests.cpp
index a160472..2b7b7f3 100644
--- a/lib/cpp/src/concurrency/test/Tests.cpp
+++ b/lib/cpp/src/concurrency/test/Tests.cpp
@@ -129,13 +129,13 @@
for (size_t workerCount = minWorkerCount; workerCount < maxWorkerCount; workerCount*= 2) {
- size_t taskCount = workerCount * tasksPerWorker;
+ size_t taskCount = workerCount * tasksPerWorker;
- std::cout << "\t\tThreadManager load test: worker count: " << workerCount << " task count: " << taskCount << " delay: " << delay << std::endl;
+ std::cout << "\t\tThreadManager load test: worker count: " << workerCount << " task count: " << taskCount << " delay: " << delay << std::endl;
- ThreadManagerTests threadManagerTests;
+ ThreadManagerTests threadManagerTests;
- threadManagerTests.loadTest(taskCount, delay, workerCount);
+ threadManagerTests.loadTest(taskCount, delay, workerCount);
}
}
}
diff --git a/lib/cpp/src/concurrency/test/ThreadFactoryTests.h b/lib/cpp/src/concurrency/test/ThreadFactoryTests.h
index 99bc94e..0dcf0bb 100644
--- a/lib/cpp/src/concurrency/test/ThreadFactoryTests.h
+++ b/lib/cpp/src/concurrency/test/ThreadFactoryTests.h
@@ -162,22 +162,22 @@
void run() {
{
Synchronized s(_monitor);
- if (_state == SynchStartTask::STARTING) {
- _state = SynchStartTask::STARTED;
- _monitor.notify();
- }
+ if (_state == SynchStartTask::STARTING) {
+ _state = SynchStartTask::STARTED;
+ _monitor.notify();
+ }
}
{
Synchronized s(_monitor);
while (_state == SynchStartTask::STARTED) {
- _monitor.wait();
- }
+ _monitor.wait();
+ }
- if (_state == SynchStartTask::STOPPING) {
+ if (_state == SynchStartTask::STOPPING) {
_state = SynchStartTask::STOPPED;
_monitor.notifyAll();
- }
+ }
}
}
@@ -208,7 +208,7 @@
{
Synchronized s(monitor);
while (state == SynchStartTask::STARTING) {
- monitor.wait();
+ monitor.wait();
}
}
@@ -224,13 +224,13 @@
if (state == SynchStartTask::STARTED) {
- state = SynchStartTask::STOPPING;
+ state = SynchStartTask::STOPPING;
- monitor.notify();
+ monitor.notify();
}
while (state == SynchStartTask::STOPPING) {
- monitor.wait();
+ monitor.wait();
}
}
diff --git a/lib/cpp/src/concurrency/test/ThreadManagerTests.h b/lib/cpp/src/concurrency/test/ThreadManagerTests.h
index a8fdcda..261ad5e 100644
--- a/lib/cpp/src/concurrency/test/ThreadManagerTests.h
+++ b/lib/cpp/src/concurrency/test/ThreadManagerTests.h
@@ -65,14 +65,14 @@
{
Synchronized s(_monitor);
- // std::cout << "Thread " << _count << " completed " << std::endl;
+ // std::cout << "Thread " << _count << " completed " << std::endl;
- _count--;
+ _count--;
- if (_count == 0) {
+ if (_count == 0) {
- _monitor.notify();
- }
+ _monitor.notify();
+ }
}
}
@@ -117,7 +117,7 @@
for (std::set<shared_ptr<ThreadManagerTests::Task> >::iterator ix = tasks.begin(); ix != tasks.end(); ix++) {
- threadManager->add(*ix);
+ threadManager->add(*ix);
}
{
@@ -125,7 +125,7 @@
while(activeCount > 0) {
- monitor.wait();
+ monitor.wait();
}
}
@@ -147,19 +147,19 @@
assert(delta > 0);
if (task->_startTime < firstTime) {
- firstTime = task->_startTime;
+ firstTime = task->_startTime;
}
if (task->_endTime > lastTime) {
- lastTime = task->_endTime;
+ lastTime = task->_endTime;
}
if (delta < minTime) {
- minTime = delta;
+ minTime = delta;
}
if (delta > maxTime) {
- maxTime = delta;
+ maxTime = delta;
}
averageTime+= delta;
@@ -258,7 +258,7 @@
}
for (std::set<shared_ptr<ThreadManagerTests::BlockTask> >::iterator ix = tasks.begin(); ix != tasks.end(); ix++) {
- threadManager->add(*ix);
+ threadManager->add(*ix);
}
if(!(success = (threadManager->totalTaskCount() == pendingTaskMaxCount + workerCount))) {
diff --git a/lib/cpp/src/concurrency/test/TimerManagerTests.h b/lib/cpp/src/concurrency/test/TimerManagerTests.h
index e7948e4..bd959cd 100644
--- a/lib/cpp/src/concurrency/test/TimerManagerTests.h
+++ b/lib/cpp/src/concurrency/test/TimerManagerTests.h
@@ -54,7 +54,7 @@
float error = delta / _timeout;
if(error < ERROR) {
- _success = true;
+ _success = true;
}
_done = true;
@@ -62,7 +62,7 @@
std::cout << "\t\t\tTimerManagerTests::Task[" << this << "] done" << std::endl; //debug
{Synchronized s(_monitor);
- _monitor.notifyAll();
+ _monitor.notifyAll();
}
}
@@ -99,11 +99,11 @@
{
Synchronized s(_monitor);
- timerManager.add(orphanTask, 10 * timeout);
+ timerManager.add(orphanTask, 10 * timeout);
- timerManager.add(task, timeout);
+ timerManager.add(task, timeout);
- _monitor.wait();
+ _monitor.wait();
}
assert(task->_done);