From d49e2e46099e3599bdc8d81efe9ee8bd1cdcb6ee Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 12 Dec 2018 10:47:46 +0200 Subject: use std::::swap, instead of copy and clear Change-Id: If49c33e271426ff5c2d0c6cc4010670f797bdd38 Reviewed-on: https://gerrit.libreoffice.org/65001 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/unx/gtk/gtksalframe.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vcl') diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index a4e6e0fdcd2d..8b420b49793f 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -2473,8 +2473,8 @@ void GtkSalFrame::createNewWindow( ::Window aNewParent, bool bXEmbed, SalX11Scre if( bWasVisible ) Show( true ); - std::list< GtkSalFrame* > aChildren = m_aChildren; - m_aChildren.clear(); + std::list< GtkSalFrame* > aChildren; + aChildren.swap(m_aChildren); for (auto const& child : aChildren) child->createNewWindow( None, false, m_nXScreen ); -- cgit