Skip to content

Commit

Permalink
Format with clang-format 19
Browse files Browse the repository at this point in the history
  • Loading branch information
deltaphi committed Dec 27, 2024
1 parent eeca9f1 commit bbf60c3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion c6021light/lib/freertossupport/OsQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class OsQueue {
BaseType_t higherPriorityTaskWoken;
};

OsQueue() : handle_(NULL){};
OsQueue() : handle_(NULL) {};

OsQueue(QueueHandle_t handle) : handle_(handle) { configASSERT(handle_ != NULL); }

Expand Down
2 changes: 1 addition & 1 deletion c6021light/lib/freertossupport/OsTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class StaticOsTask : public TaskClass {
"TaskClass must extend freertossupport::OsTask.");

void Create(const char* taskName, UBaseType_t priority) {
this->handle_ = xTaskCreateStatic((void (*)(void*)) & TaskClass::TaskMain, taskName, StackSize,
this->handle_ = xTaskCreateStatic((void (*)(void*))&TaskClass::TaskMain, taskName, StackSize,
this, priority, stack_, &tcb_);
configASSERT(this->handle_ != NULL);
}
Expand Down
4 changes: 2 additions & 2 deletions c6021light/src/MarklinI2C/Messages/AccessoryMsg.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AccessoryMsg {
public:
constexpr static const uint8_t kAccesoryMessageBytes = 3;

constexpr AccessoryMsg(){};
constexpr AccessoryMsg() {};

constexpr AccessoryMsg(const AccessoryMsg&) = default;
constexpr AccessoryMsg& operator=(const AccessoryMsg&) = default;
Expand All @@ -29,7 +29,7 @@ class AccessoryMsg {
constexpr AccessoryMsg& operator=(AccessoryMsg&&) = default;

constexpr AccessoryMsg(uint8_t destination, uint8_t source, uint8_t data)
: destination_(destination), source_(source), data_(data){};
: destination_(destination), source_(source), data_(data) {};

constexpr bool operator==(const AccessoryMsg& other) const {
return this->destination_ == other.destination_ && this->source_ == other.source_ &&
Expand Down
2 changes: 1 addition & 1 deletion c6021light/src/hal/stm32eepromEmulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class DataModelStoreVisitor {

class iterator {
public:
iterator(const DataModel& model, size_type index) : model_(model), index_(index){};
iterator(const DataModel& model, size_type index) : model_(model), index_(index) {};

bool operator!=(const iterator& other) const {
return this->index_ != other.index_ || &(this->model_) != &(other.model_);
Expand Down
6 changes: 4 additions & 2 deletions c6021light/src/tasks/RoutingTask/I2CForwarder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ bool sameDecoder(const RR32Can::MachineTurnoutAddress left,
return (left.value() & mask) == (right.value() & mask);
}

bool isMatchingTurnoutRailProtocol(const RR32Can::RailProtocol left, const RR32Can::RailProtocol right) {
bool isMatchingTurnoutRailProtocol(const RR32Can::RailProtocol left,
const RR32Can::RailProtocol right) {
if (left == right) {
return true;
} else if (left == RR32Can::RailProtocol::MM1 || left == RR32Can::RailProtocol::MM2) {
Expand All @@ -41,7 +42,8 @@ void I2CForwarder::forward(const RR32Can::CanFrame& frame) {
// Responses are forwarded to I2C
printf(" Got an Accessory packet!\n");

if (!isMatchingTurnoutRailProtocol(turnoutPacket.getRailProtocol(), dataModel_->accessoryRailProtocol)) {
if (!isMatchingTurnoutRailProtocol(turnoutPacket.getRailProtocol(),
dataModel_->accessoryRailProtocol)) {
// Not a packet of the expected accessory protocol
return;
}
Expand Down

0 comments on commit bbf60c3

Please sign in to comment.