This commit is contained in:
2025-08-06 02:06:20 +03:00
parent 138e4bf84d
commit 6315d5e18e
15 changed files with 630 additions and 152 deletions

View File

@@ -150,10 +150,25 @@ public:
init(telemetry, hardware, prohibited_zone);
}
MccSimpleSlewModel(MccSimpleSlewModel&&) = default;
MccSimpleSlewModel& operator=(MccSimpleSlewModel&&) = default;
MccSimpleSlewModel(const MccSimpleSlewModel&) = default;
MccSimpleSlewModel& operator=(const MccSimpleSlewModel&) = default;
MccSimpleSlewModel(MccSimpleSlewModel&& other)
: _stopRequested(other._stopRequested.load()), _slewFunc(std::move(other._slewFunc))
{
}
MccSimpleSlewModel& operator=(MccSimpleSlewModel&& other)
{
if (this == &other) {
return *this;
}
_stopRequested = other._stopRequested.load();
_slewFunc = std::move(_slewFunc);
return *this;
};
MccSimpleSlewModel(const MccSimpleSlewModel&) = delete;
MccSimpleSlewModel& operator=(const MccSimpleSlewModel&) = delete;
virtual ~MccSimpleSlewModel()
{
@@ -422,5 +437,6 @@ protected:
}
};
static_assert(std::movable<MccSimpleSlewModel<>>);
} // namespace mcc