[client,sdl] fix move constructors
use default implementation to avoid use after move
This commit is contained in:
parent
6548f1f9dd
commit
3c9a45e9d0
@ -36,10 +36,7 @@ SdlButton::SdlButton(SDL_Renderer* renderer, std::string label, int id, SDL_Rect
|
||||
update_text(renderer, _name, buttonfontcolor, buttonbackgroundcolor);
|
||||
}
|
||||
|
||||
SdlButton::SdlButton(SdlButton&& other) noexcept
|
||||
: SdlWidget(std::move(other)), _name(std::move(other._name)), _id(other._id)
|
||||
{
|
||||
}
|
||||
SdlButton::SdlButton(SdlButton&& other) noexcept = default;
|
||||
|
||||
SdlButton::~SdlButton() = default;
|
||||
|
||||
|
@ -42,11 +42,7 @@ SdlSelectWidget::SdlSelectWidget(SDL_Renderer* renderer, std::string label, SDL_
|
||||
update_text(renderer);
|
||||
}
|
||||
|
||||
SdlSelectWidget::SdlSelectWidget(SdlSelectWidget&& other) noexcept
|
||||
: SdlWidget(std::move(other)), _text(std::move(other._text)), _mouseover(other._mouseover),
|
||||
_highlight(other._highlight)
|
||||
{
|
||||
}
|
||||
SdlSelectWidget::SdlSelectWidget(SdlSelectWidget&& other) noexcept = default;
|
||||
|
||||
SdlSelectWidget::~SdlSelectWidget() = default;
|
||||
|
||||
|
@ -36,10 +36,7 @@ SdlButton::SdlButton(SDL_Renderer* renderer, std::string label, int id, const SD
|
||||
update_text(renderer, _name, buttonfontcolor, buttonbackgroundcolor);
|
||||
}
|
||||
|
||||
SdlButton::SdlButton(SdlButton&& other) noexcept
|
||||
: SdlWidget(std::move(other)), _name(std::move(other._name)), _id(other._id)
|
||||
{
|
||||
}
|
||||
SdlButton::SdlButton(SdlButton&& other) noexcept = default;
|
||||
|
||||
SdlButton::~SdlButton() = default;
|
||||
|
||||
|
@ -42,11 +42,7 @@ SdlSelectWidget::SdlSelectWidget(SDL_Renderer* renderer, std::string label, cons
|
||||
update_text(renderer);
|
||||
}
|
||||
|
||||
SdlSelectWidget::SdlSelectWidget(SdlSelectWidget&& other) noexcept
|
||||
: SdlWidget(std::move(other)), _text(std::move(other._text)), _mouseover(other._mouseover),
|
||||
_highlight(other._highlight)
|
||||
{
|
||||
}
|
||||
SdlSelectWidget::SdlSelectWidget(SdlSelectWidget&& other) noexcept = default;
|
||||
|
||||
bool SdlSelectWidget::set_mouseover(SDL_Renderer* renderer, bool mouseOver)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user