From baa3426f19af5f3ff8ac6aa1808284287c627149 Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Thu, 16 Jul 2020 23:05:01 +0300 Subject: [PATCH] ci: fix codacy style complaints --- code/espurna/gpio.h | 2 +- code/espurna/libs/BasePin.h | 2 +- code/espurna/mcp23s08.h | 2 +- code/espurna/telnet.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/espurna/gpio.h b/code/espurna/gpio.h index 4fe04b0c..0fb01684 100644 --- a/code/espurna/gpio.h +++ b/code/espurna/gpio.h @@ -18,7 +18,7 @@ constexpr const size_t GpioPins = 17; // real hardware pin class GpioPin final : virtual public BasePin { public: - GpioPin(unsigned char pin); + explicit GpioPin(unsigned char pin); void pinMode(int8_t mode); void digitalWrite(int8_t val); diff --git a/code/espurna/libs/BasePin.h b/code/espurna/libs/BasePin.h index 593b5960..cc1814d6 100644 --- a/code/espurna/libs/BasePin.h +++ b/code/espurna/libs/BasePin.h @@ -13,7 +13,7 @@ Copyright (C) 2020 by Maxim Prokhorov // base interface for generic pin handler. struct BasePin { - BasePin(unsigned char pin) : + explicit BasePin(unsigned char pin) : pin(pin) {} diff --git a/code/espurna/mcp23s08.h b/code/espurna/mcp23s08.h index 3fede14c..b32e3de8 100644 --- a/code/espurna/mcp23s08.h +++ b/code/espurna/mcp23s08.h @@ -26,7 +26,7 @@ constexpr size_t McpGpioPins = 8; // real hardware pin class McpGpioPin final : public BasePin { public: - McpGpioPin(unsigned char pin); + explicit McpGpioPin(unsigned char pin); void pinMode(int8_t mode); void digitalWrite(int8_t val); diff --git a/code/espurna/telnet.cpp b/code/espurna/telnet.cpp index dd3cf7a7..ef08d493 100644 --- a/code/espurna/telnet.cpp +++ b/code/espurna/telnet.cpp @@ -34,7 +34,7 @@ struct AsyncBufferedClient { constexpr static const size_t BUFFERS_MAX = 5; using buffer_t = std::vector; - AsyncBufferedClient(AsyncClient* client); + explicit AsyncBufferedClient(AsyncClient* client); size_t write(char c); size_t write(const char* data, size_t size=0);