Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ~LED() { delete [] pins, r, g, b, task, taskgoal; }
- LED &operator=(LED const& other)
- {
- LED copy(other);
- swap(*this, copy);
- return *this;
- }
- LED(LED&& that) noexcept
- : pins(nullptr)
- , r(0)
- , g(0)
- , b(0)
- , task(0)
- , taskgoal(0)
- {
- swap(*this, that);
- }
- LED& operator=(LED&& that) noexcept
- {
- swap(*this, that);
- return *this;
- }
- friend void swap(LED& lhs, LED& rhs) noexcept
- {
- std::swap(lhs.pins, rhs.pins);
- std::swap(lhs.r, rhs.r);
- std::swap(lhs.g, rhs.g);
- std::swap(lhs.b, rhs.b);
- std::swap(lhs.task, rhs.task);
- std::swap(lhs.taskgoal, rhs.taskgoal);
- }
Advertisement
Add Comment
Please, Sign In to add comment