Skip to content

Commit e7113dc

Browse files
committed
Handle yet more tidy messages
1 parent dd87445 commit e7113dc

File tree

9 files changed

+25
-13
lines changed

9 files changed

+25
-13
lines changed

ref_app/src/mcal/host/mcal_wdg_watchdog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
};
120120

121121
template<const typename watchdog_base::base_timer_type::tick_type MyPeriod>
122-
watchdog<MyPeriod> watchdog<MyPeriod>::my_watchdog(thread_function);
122+
watchdog<MyPeriod> watchdog<MyPeriod>::my_watchdog(thread_function); // NOLINT(cert-err58-cpp)
123123

124124
template<const typename watchdog_base::base_timer_type::tick_type MyPeriod>
125125
std::atomic_flag watchdog<MyPeriod>::my_lock = ATOMIC_FLAG_INIT;

ref_app/src/mcal_led/mcal_led_boolean_state_base.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414

1515
class led_boolean_state_base : public mcal::led::led_base // NOLINT(cppcoreguidelines-special-member-functions,hicpp-special-member-functions)
1616
{
17+
public:
18+
~led_boolean_state_base() override = default;
19+
1720
protected:
1821
constexpr led_boolean_state_base() = default;
1922

20-
~led_boolean_state_base() override = default;
21-
2223
auto toggle() -> void override
2324
{
2425
// Toggle the LED state.

ref_app/src/mcal_led/mcal_led_console.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515

1616
namespace mcal { namespace led {
1717

18-
class led_console final : public mcal::led::led_boolean_state_base
18+
class led_console final : public mcal::led::led_boolean_state_base // NOLINT(cppcoreguidelines-special-member-functions,hicpp-special-member-functions)
1919
{
2020
public:
2121
explicit constexpr led_console(const std::uint_fast8_t i)
2222
: my_index(i) { }
2323

24+
~led_console() override = default;
25+
2426
auto toggle() -> void override
2527
{
2628
using base_class_type = mcal::led::led_boolean_state_base;

ref_app/src/mcal_led/mcal_led_port.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
port_type::set_direction_output();
2424
}
2525

26+
~led_port() override = default;
27+
2628
auto toggle() -> void override
2729
{
2830
using base_class_type = led_boolean_state_base;

ref_app/src/mcal_led/mcal_led_port_inverted.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
port_type::set_direction_output();
2424
}
2525

26+
~led_port_inverted() override = default;
27+
2628
auto toggle() -> void override
2729
{
2830
using base_class_type = led_boolean_state_base;

ref_app/src/mcal_led/mcal_led_pwm.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
my_pwm.set_duty(static_cast<std::uint16_t>(UINT8_C(0)));
2222
}
2323

24+
~led_pwm() override = default;
25+
2426
auto state_is_on() const -> bool override { return (my_pwm.get_duty() > static_cast<std::uint16_t>(UINT8_C(0))); }
2527

2628
auto toggle() -> void override

ref_app/src/mcal_led/mcal_led_rgb_base.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
class led_rgb_base : public mcal::led::led_boolean_state_base
1818
{
1919
public:
20+
~led_rgb_base() override = default;
21+
2022
auto toggle() -> void override
2123
{
2224
using base_class_type = mcal::led::led_boolean_state_base;

ref_app/src/os/os_cfg.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
#ifndef OS_CFG_2011_10_20_H
99
#define OS_CFG_2011_10_20_H
1010

11+
#include <util/utility/util_time.h>
12+
1113
#include <cstddef>
1214
#include <cstdint>
1315
#include <limits>
1416

15-
#include <util/utility/util_time.h>
16-
1717
// Declare the task initialization and the task function of the idle process.
1818
namespace sys { namespace idle {
1919

@@ -52,7 +52,8 @@
5252
{
5353
// Enumerate the task IDs. Note that the order in this list must
5454
// be identical with the order of the tasks in the task list below.
55-
enum class task_id_type
55+
56+
enum class task_id_type // NOLINT(performance-enum-size)
5657
{
5758
task_id_app_led,
5859
task_id_app_benchmark,
@@ -67,10 +68,10 @@
6768
using tick_type = timer_type::tick_type;
6869
using event_type = std::uint_fast16_t;
6970

70-
static_assert(std::numeric_limits<os::tick_type>::digits >= 32,
71+
static_assert(std::numeric_limits<os::tick_type>::digits >= static_cast<int>(INT8_C(32)),
7172
"The operating system timer_type must be at least 32-bits wide.");
7273

73-
static_assert(std::numeric_limits<os::event_type>::digits >= 16,
74+
static_assert(std::numeric_limits<os::event_type>::digits >= static_cast<int>(INT8_C(16)),
7475
"The operating system event_type must be at least 16-bits wide.");
7576
} // namespace os
7677

ref_app/src/os/os_task_control_block.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
auto operator=(task_control_block&&) noexcept -> task_control_block& = delete;
4141

4242
private:
43-
const function_type my_init;
44-
const function_type my_func;
45-
const tick_type my_cycle;
43+
const function_type my_init; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)
44+
const function_type my_func; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)
45+
const tick_type my_cycle; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)
4646
timer_type my_timer;
4747
event_type my_event { };
4848

@@ -80,6 +80,6 @@
8080
friend auto get_event (event_type&) -> void;
8181
friend auto clear_event(const event_type&) -> void;
8282
};
83-
}
83+
} // namespace os
8484

8585
#endif // OS_TASK_CONTROL_BLOCK_2013_07_30_H

0 commit comments

Comments
 (0)