chore: ensure Consistent formatting of code across entire project

* Create basic config for clang-format

* Format source files using clang-format

* Add Github Action checking proper code formatting after every Pull request
This commit is contained in:
Paweł Kotiuk
2020-10-12 15:57:33 +02:00
committed by GitHub
parent 759d2e80c1
commit a0c7d84b8d
261 changed files with 13342 additions and 15466 deletions

View File

@@ -18,17 +18,17 @@
#include "inputdevicebitarraystatus.h"
#include "messagehandler.h"
#include "inputdevice.h"
#include "setjoystick.h"
#include "joystick.h"
#include "joydpad.h"
#include "joybutton.h"
#include "joydpad.h"
#include "joystick.h"
#include "messagehandler.h"
#include "setjoystick.h"
#include <QDebug>
InputDeviceBitArrayStatus::InputDeviceBitArrayStatus(InputDevice *device, bool readCurrent, QObject *parent) :
QObject(parent)
InputDeviceBitArrayStatus::InputDeviceBitArrayStatus(InputDevice *device, bool readCurrent, QObject *parent)
: QObject(parent)
{
qInstallMessageHandler(MessageHandler::myMessageOutput);
@@ -40,8 +40,7 @@ InputDeviceBitArrayStatus::InputDeviceBitArrayStatus(InputDevice *device, bool r
if ((axis != nullptr) && readCurrent)
{
axesStatus.append(!axis->inDeadZone(axis->getCurrentRawValue()) ? true : false);
}
else
} else
{
axesStatus.append(false);
}
@@ -55,8 +54,7 @@ InputDeviceBitArrayStatus::InputDeviceBitArrayStatus(InputDevice *device, bool r
if ((dpad != nullptr) && readCurrent)
{
hatButtonStatus.append(dpad->getCurrentDirection() != JoyDPadButton::DpadCentered ? true : false);
}
else
} else
{
hatButtonStatus.append(false);
}
@@ -150,7 +148,4 @@ void InputDeviceBitArrayStatus::clearStatusValues()
getButtonStatusLocal().fill(false);
}
QBitArray& InputDeviceBitArrayStatus::getButtonStatusLocal() {
return buttonStatus;
}
QBitArray &InputDeviceBitArrayStatus::getButtonStatusLocal() { return buttonStatus; }