Add format script which invokes clang-format on the C++ source code (#41)

On Windows machines, clang-format.exe must be in the PATH environment variable.
This commit is contained in:
Tyler Veness
2016-05-20 17:30:37 -07:00
committed by Peter Johnson
parent 68690643d2
commit e14e45da76
383 changed files with 13787 additions and 13198 deletions

View File

@@ -7,9 +7,7 @@
#include "HAL/cpp/Semaphore.hpp"
Semaphore::Semaphore(uint32_t count) {
m_count = count;
}
Semaphore::Semaphore(uint32_t count) { m_count = count; }
void Semaphore::give() {
std::lock_guard<priority_mutex> lock(m_mutex);
@@ -19,7 +17,7 @@ void Semaphore::give() {
void Semaphore::take() {
std::unique_lock<priority_mutex> lock(m_mutex);
m_condition.wait(lock, [this] { return m_count; } );
m_condition.wait(lock, [this] { return m_count; });
--m_count;
}
@@ -28,8 +26,7 @@ bool Semaphore::tryTake() {
if (m_count) {
--m_count;
return true;
}
else {
} else {
return false;
}
}