A Whole New World (clang-format edition)

I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?

I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon

A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format

A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
This commit is contained in:
Rémi Verschelde 2017-03-05 16:44:50 +01:00
parent 45438e9918
commit 5dbf1809c6
1318 changed files with 140051 additions and 166004 deletions

View file

@ -27,10 +27,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "core/error_macros.h"
#include "power_javascript.h"
#include "core/error_macros.h"
bool PowerJavascript::UpdatePowerInfo() {
// TODO Javascript implementation
@ -40,8 +38,7 @@ bool PowerJavascript::UpdatePowerInfo() {
PowerState PowerJavascript::get_power_state() {
if (UpdatePowerInfo()) {
return power_state;
}
else {
} else {
WARN_PRINT("Power management is not implemented on this platform, defaulting to POWERSTATE_UNKNOWN");
return POWERSTATE_UNKNOWN;
}
@ -50,8 +47,7 @@ PowerState PowerJavascript::get_power_state() {
int PowerJavascript::get_power_seconds_left() {
if (UpdatePowerInfo()) {
return nsecs_left;
}
else {
} else {
WARN_PRINT("Power management is not implemented on this platform, defaulting to -1");
return -1;
}
@ -60,16 +56,14 @@ int PowerJavascript::get_power_seconds_left() {
int PowerJavascript::get_power_percent_left() {
if (UpdatePowerInfo()) {
return percent_left;
}
else {
} else {
WARN_PRINT("Power management is not implemented on this platform, defaulting to -1");
return -1;
}
}
PowerJavascript::PowerJavascript() : nsecs_left(-1), percent_left(-1), power_state(POWERSTATE_UNKNOWN) {
PowerJavascript::PowerJavascript()
: nsecs_left(-1), percent_left(-1), power_state(POWERSTATE_UNKNOWN) {
}
PowerJavascript::~PowerJavascript() {