Clangtidy improvements (const & noexcept)
This commit is contained in:
parent
d1369fd8ec
commit
0a8802fb51
2 changed files with 14 additions and 14 deletions
|
@ -8,7 +8,7 @@ freertos::Task::Task(TaskFunction_t taskFunction, const etl::string_view name,
|
|||
params, priority, &handle, coreID);
|
||||
}
|
||||
|
||||
freertos::Task::Task(Task &&other)
|
||||
freertos::Task::Task(Task &&other) noexcept
|
||||
: name{etl::move(other.name)}, handle{etl::move(other.handle)},
|
||||
stackDepth{etl::move(other.stackDepth)},
|
||||
priority{etl::move(other.priority)}, coreID{etl::move(other.coreID)} {}
|
||||
|
@ -19,7 +19,7 @@ freertos::Task::~Task() {
|
|||
}
|
||||
}
|
||||
|
||||
auto freertos::Task::operator=(const Task &&other) -> Task & {
|
||||
auto freertos::Task::operator=(const Task &&other) noexcept -> Task & {
|
||||
name = etl::move(other.name);
|
||||
handle = etl::move(other.handle);
|
||||
stackDepth = etl::move(other.stackDepth);
|
||||
|
@ -28,16 +28,16 @@ auto freertos::Task::operator=(const Task &&other) -> Task & {
|
|||
return *this;
|
||||
}
|
||||
|
||||
auto freertos::Task::getName() -> etl::string_view { return name; }
|
||||
auto freertos::Task::getName() const -> etl::string_view { return name; }
|
||||
|
||||
auto freertos::Task::getStackDepth() -> uint32_t { return stackDepth; }
|
||||
auto freertos::Task::getStackDepth() const -> uint32_t { return stackDepth; }
|
||||
|
||||
auto freertos::Task::getPriority() -> UBaseType_t { return priority; }
|
||||
auto freertos::Task::getPriority() const -> UBaseType_t { return priority; }
|
||||
|
||||
auto freertos::Task::setPriority(const UBaseType_t newPriority) -> void {
|
||||
vTaskPrioritySet(handle, newPriority);
|
||||
}
|
||||
|
||||
auto freertos::Task::getCoreID() -> BaseType_t { return coreID; }
|
||||
auto freertos::Task::getCoreID() const -> BaseType_t { return coreID; }
|
||||
|
||||
auto freertos::Task::isValid() -> bool { return status == pdPASS; }
|
||||
auto freertos::Task::isValid() const -> bool { return status == pdPASS; }
|
|
@ -9,17 +9,17 @@ public:
|
|||
const uint32_t stackDepth, void *const params, UBaseType_t priority,
|
||||
const BaseType_t coreID);
|
||||
Task(const Task &other) = delete;
|
||||
Task(Task &&other);
|
||||
Task(Task &&other) noexcept;
|
||||
~Task();
|
||||
Task &operator=(const Task &other) = delete;
|
||||
Task &operator=(const Task &&other);
|
||||
Task &operator=(const Task &&other) noexcept;
|
||||
|
||||
etl::string_view getName();
|
||||
uint32_t getStackDepth();
|
||||
UBaseType_t getPriority();
|
||||
etl::string_view getName() const;
|
||||
uint32_t getStackDepth() const;
|
||||
UBaseType_t getPriority() const;
|
||||
void setPriority(const UBaseType_t newPriority);
|
||||
BaseType_t getCoreID();
|
||||
bool isValid();
|
||||
BaseType_t getCoreID() const;
|
||||
bool isValid() const;
|
||||
|
||||
private:
|
||||
etl::string_view name;
|
||||
|
|
Reference in a new issue