Apply clang-tidy inspections

This commit is contained in:
pixl
2020-07-14 00:12:40 -04:00
parent 937225b6f2
commit d3d4a2755a
23 changed files with 94 additions and 90 deletions

View File

@@ -40,6 +40,11 @@ ReceiverMonitor::ReceiverMonitor(std::string path) : _receiver (
_receiver->enableHidppNotifications(notification_flags);
}
ReceiverMonitor::~ReceiverMonitor()
{
this->stop();
}
void ReceiverMonitor::run()
{
_receiver->listen();

View File

@@ -33,6 +33,7 @@ namespace dj
{
public:
explicit ReceiverMonitor(std::string path);
~ReceiverMonitor();
void enumerate();
void run();

View File

@@ -16,8 +16,8 @@
*
*/
#ifndef LOGID_HIDPP_DEFS_H
#define LOGID_HIDPP_DEFS_H
#ifndef LOGID_BACKEND_HIDPP_DEFS_H
#define LOGID_BACKEND_HIDPP_DEFS_H
#define LOGID_HIDPP_SOFTWARE_ID 0
@@ -52,4 +52,4 @@ namespace hidpp
static constexpr std::size_t LongParamLength = 16;
} } }
#endif //LOGID_HIDPP_DEFS_H
#endif //LOGID_BACKEND_HIDPP_DEFS_H

View File

@@ -16,8 +16,8 @@
*
*/
#ifndef LOGID_HIDPP20_DEVICE_H
#define LOGID_HIDPP20_DEVICE_H
#ifndef LOGID_BACKEND_HIDPP20_DEVICE_H
#define LOGID_BACKEND_HIDPP20_DEVICE_H
#include "../hidpp/Device.h"
#include <cstdint>
@@ -37,4 +37,4 @@ namespace hidpp20 {
};
}}}
#endif //LOGID_HIDPP20_DEVICE_H
#endif //LOGID_BACKEND_HIDPP20_DEVICE_H

View File

@@ -17,7 +17,6 @@
*/
#include <cassert>
#include <cstring>
#include "Error.h"
using namespace logid::backend::hidpp20;

View File

@@ -16,8 +16,8 @@
*
*/
#ifndef LOGID_HIDPP20_ESSENTIAL_FEATURE_H
#define LOGID_HIDPP20_ESSENTIAL_FEATURE_H
#ifndef LOGID_BACKEND_HIDPP20_ESSENTIAL_FEATURE_H
#define LOGID_BACKEND_HIDPP20_ESSENTIAL_FEATURE_H
// WARNING: UNSAFE
@@ -47,4 +47,4 @@ namespace hidpp20
};
}}}
#endif //LOGID_HIDPP20_ESSENTIAL_FEATURE_H
#endif //LOGID_BACKEND_HIDPP20_ESSENTIAL_FEATURE_H

View File

@@ -16,8 +16,8 @@
*
*/
#ifndef LOGID_HIDPP20_FEATURE_H
#define LOGID_HIDPP20_FEATURE_H
#ifndef LOGID_BACKEND_HIDPP20_FEATURE_H
#define LOGID_BACKEND_HIDPP20_FEATURE_H
#include <cstdint>
#include "Device.h"
@@ -51,4 +51,4 @@ namespace hidpp20 {
};
}}}
#endif //LOGID_HIDPP20_FEATURE_H
#endif //LOGID_BACKEND_HIDPP20_FEATURE_H

View File

@@ -85,7 +85,6 @@ namespace hidpp20
void setMode(uint8_t mode);
bool getRatchetState();
///TODO: Event handlers
static WheelStatus wheelMovementEvent(const hidpp::Report& report);
static RatchetState ratchetSwitchEvent(const hidpp::Report& report);
};

View File

@@ -44,10 +44,10 @@ DEFINE_REPROG(ReprogControlsV4, ReprogControlsV3)
std::shared_ptr<ReprogControls> ReprogControls::autoVersion(Device *dev)
{
MAKE_REPROG(ReprogControlsV4, dev);
MAKE_REPROG(ReprogControlsV3, dev);
MAKE_REPROG(ReprogControlsV2_2, dev);
MAKE_REPROG(ReprogControlsV2, dev);
MAKE_REPROG(ReprogControlsV4, dev)
MAKE_REPROG(ReprogControlsV3, dev)
MAKE_REPROG(ReprogControlsV2_2, dev)
MAKE_REPROG(ReprogControlsV2, dev)
// If base version cannot be made, throw error
return std::make_shared<ReprogControls>(dev);