Skip to content

Commit 0e6bebe

Browse files
committed
fix (hook-create-chronics): Fix cpp file format for CI pre-commit tests
Signed-off-by: Ritesh.K <riteshkarki6@gmail.com>
1 parent a0143ab commit 0e6bebe

File tree

15 files changed

+37
-35
lines changed

15 files changed

+37
-35
lines changed

common/include/villas/kernel/devices/device.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace devices {
1919

2020
class Device {
2121
public:
22-
virtual ~Device() {};
22+
virtual ~Device(){};
2323

2424
virtual std::optional<std::unique_ptr<Driver>> driver() const = 0;
2525
virtual std::optional<int> iommu_group() const = 0;

common/include/villas/kernel/devices/ip_device.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class IpDevice : public PlatformDevice {
2525
private:
2626
IpDevice() = delete;
2727
IpDevice(const fs::path valid_path) //! Dont allow unvalidated paths
28-
: PlatformDevice(valid_path) {};
28+
: PlatformDevice(valid_path){};
2929

3030
public:
3131
size_t addr() const;

common/include/villas/kernel/devices/linux_driver.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ class LinuxDriver : public Driver {
3333
public:
3434
LinuxDriver(const fs::path path)
3535
: LinuxDriver(path, path / fs::path(BIND_DEFAULT),
36-
path / fs::path(UNBIND_DEFAULT)) {};
36+
path / fs::path(UNBIND_DEFAULT)){};
3737

3838
LinuxDriver(const fs::path path, const fs::path bind_path,
3939
const fs::path unbind_path)
40-
: path(path), bind_path(bind_path), unbind_path(unbind_path) {};
40+
: path(path), bind_path(bind_path), unbind_path(unbind_path){};
4141

4242
public:
4343
void attach(const Device &device) const override;

common/include/villas/kernel/devices/platform_device.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ class PlatformDevice : public Device {
2929
public:
3030
PlatformDevice(const fs::path path)
3131
: PlatformDevice(path, fs::path(PROBE_DEFAULT),
32-
path / fs::path(OVERRIDE_DEFAULT)) {};
32+
path / fs::path(OVERRIDE_DEFAULT)){};
3333

3434
PlatformDevice(const fs::path path, const fs::path probe_path,
3535
const fs::path override_path)
3636
: m_path(path), m_probe_path(probe_path),
37-
m_override_path(override_path) {};
37+
m_override_path(override_path){};
3838

3939
// Implement device interface
4040
std::optional<std::unique_ptr<Driver>> driver() const override;

common/include/villas/utils.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
#ifdef ALIGN
5353
#undef ALIGN
5454
#endif
55-
#define ALIGN(x, a) ALIGN_MASK(x, (uintptr_t)(a) - 1)
55+
#define ALIGN(x, a) ALIGN_MASK(x, (uintptr_t)(a)-1)
5656
#define ALIGN_MASK(x, m) (((uintptr_t)(x) + (m)) & ~(m))
5757
#define IS_ALIGNED(x, a) (ALIGN(x, a) == (uintptr_t)x)
5858

@@ -64,13 +64,13 @@
6464
} while (0)
6565

6666
// Round-up integer division
67-
#define CEIL(x, y) (((x) + (y) - 1) / (y))
67+
#define CEIL(x, y) (((x) + (y)-1) / (y))
6868

6969
// Get nearest up-rounded power of 2
70-
#define LOG2_CEIL(x) (1 << (villas::utils::log2i((x) - 1) + 1))
70+
#define LOG2_CEIL(x) (1 << (villas::utils::log2i((x)-1) + 1))
7171

7272
// Check if the number is a power of 2
73-
#define IS_POW2(x) (((x) != 0) && !((x) & ((x) - 1)))
73+
#define IS_POW2(x) (((x) != 0) && !((x) & ((x)-1)))
7474

7575
// Calculate the number of elements in an array.
7676
#define ARRAY_LEN(a) (sizeof(a) / sizeof(a)[0])

common/lib/kernel/devices/device_connection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace devices {
1818

1919
DeviceConnection::DeviceConnection(
2020
std::shared_ptr<kernel::vfio::Device> vfio_device)
21-
: logger(villas::Log::get("DeviceConnection")), vfio_device(vfio_device) {};
21+
: logger(villas::Log::get("DeviceConnection")), vfio_device(vfio_device){};
2222

2323
DeviceConnection DeviceConnection::from(
2424
const villas::kernel::devices::Device &device,

fpga/include/villas/fpga/ips/i2c.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ namespace fpga {
2020
namespace ip {
2121

2222
#define I2C_SWTICH_ADDR 0x70
23-
#define I2C_SWITCH_CHANNEL_MAP {0x20, 0x80, 0x02, 0x08, 0x10, 0x40, 0x01, 0x04}
23+
#define I2C_SWITCH_CHANNEL_MAP \
24+
{ 0x20, 0x80, 0x02, 0x08, 0x10, 0x40, 0x01, 0x04 }
2425
#define I2C_IOEXT_ADDR 0x20
2526
#define I2C_IOEXT_REG_DIR 0x03
2627
#define I2C_IOEXT_REG_OUT 0x01
@@ -47,7 +48,7 @@ class I2c : public Node {
4748
public:
4849
Switch(I2c *i2c, uint8_t address, Logger logger = villas::Log::get("i2c"))
4950
: i2c(i2c), address(address), channel(0), readOnce(false), switchLock(),
50-
logger(logger) {};
51+
logger(logger){};
5152
Switch(const Switch &other) = delete;
5253
Switch &operator=(const Switch &other) = delete;
5354
void setChannel(uint8_t channel);

fpga/include/villas/fpga/platform_card.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class PlatformCard : public Card {
2525
public:
2626
PlatformCard(std::shared_ptr<kernel::vfio::Container> vfioContainer);
2727

28-
~PlatformCard() {};
28+
~PlatformCard(){};
2929

3030
std::vector<CoreConnection> core_connections;
3131

fpga/include/villas/fpga/utils.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class BufferedSampleFormatter {
9090
BufferedSampleFormatter(const size_t bufSamples, const size_t bufSampleSize)
9191
: buf(bufSamples * bufSampleSize + 1), // Leave room for a final `\0'
9292
bufSamples(bufSamples), bufSampleSize(bufSampleSize),
93-
currentBufLoc(0) {};
93+
currentBufLoc(0){};
9494
BufferedSampleFormatter() = delete;
9595
BufferedSampleFormatter(const BufferedSampleFormatter &) = delete;
9696
virtual char *nextBufPos() { return &buf[(currentBufLoc++) * bufSampleSize]; }
@@ -99,7 +99,7 @@ class BufferedSampleFormatter {
9999
class BufferedSampleFormatterShort : public BufferedSampleFormatter {
100100
public:
101101
BufferedSampleFormatterShort(size_t bufSizeInSamples)
102-
: BufferedSampleFormatter(bufSizeInSamples, formatStringSize) {};
102+
: BufferedSampleFormatter(bufSizeInSamples, formatStringSize){};
103103

104104
virtual void format(float value) override {
105105
size_t chars;
@@ -120,7 +120,7 @@ class BufferedSampleFormatterLong : public BufferedSampleFormatter {
120120
public:
121121
BufferedSampleFormatterLong(size_t bufSizeInSamples)
122122
: BufferedSampleFormatter(bufSizeInSamples, formatStringSize),
123-
sampleCnt(0) {};
123+
sampleCnt(0){};
124124

125125
virtual void format(float value) override {
126126
if (std::snprintf(nextBufPos(), formatStringSize + 1, formatString,

fpga/lib/core_connection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ CoreConnection::CoreConnection(
2020
std::shared_ptr<villas::fpga::ip::Core> ip,
2121
villas::kernel::devices::DeviceConnection device_connection)
2222
: logger(villas::Log::get("CoreConnection")), ip(ip),
23-
device_connection(device_connection) {};
23+
device_connection(device_connection){};
2424

2525
CoreConnection
2626
CoreConnection::from(std::shared_ptr<villas::fpga::ip::Core> ip,

0 commit comments

Comments
 (0)