1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

ConcertinaPanel: Move call that was mistakenly added to move constructor

This commit is contained in:
reuk 2023-11-02 13:57:03 +00:00 committed by Anthony Nicholls
parent 72e3e0b697
commit 65b6c85594

View file

@ -285,16 +285,17 @@ private:
CustomHeader() = default;
CustomHeader (MouseListener* l, OptionalScopedPointer<Component> c)
: listener (l), customHeaderComponent (std::move (c)) {}
CustomHeader (CustomHeader&& other) noexcept
: listener (std::exchange (other.listener, nullptr)),
customHeaderComponent (std::exchange (other.customHeaderComponent, {}))
: listener (l),
customHeaderComponent (std::move (c))
{
if (customHeaderComponent != nullptr)
customHeaderComponent->addMouseListener (listener, false);
}
CustomHeader (CustomHeader&& other) noexcept
: listener (std::exchange (other.listener, nullptr)),
customHeaderComponent (std::exchange (other.customHeaderComponent, {})) {}
CustomHeader& operator= (CustomHeader&& other) noexcept
{
std::swap (other.listener, listener);