Use std::swap
...to avoid a false libc++ -Werror,-Wunused-but-set-variable as seen with LLVM 24 trunk libc++ since <https://github.com/llvm/llvm-project/commit/97f332f8d1274f74e02b2445a7c7317a4b458cb2> "[libc++] Diagnose variables of container types" (see <https://github.com/llvm/llvm-project/issues/215545> "Over-eager -Wunused-but-set-variable for libc++ containers used only for side effect") Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com> Change-Id: I9996e63600a6711991b1c71c36af234bf4388d08 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8989 Reviewed-by: Michael Stahl <michael.stahl@collabora.com> Tested-by: Jenkins CPCI <releng@collaboraoffice.com> (cherry picked from commit ccbbd16488a00cf618b834395528b40a67c48252) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210497 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
committed by
Xisco Fauli
parent
6ffaa7e28c
commit
787d22487b
@@ -620,8 +620,7 @@ void OServiceManager::disposing()
|
||||
MutexGuard aGuard( m_aMutex );
|
||||
// erase all members
|
||||
m_ServiceMap = HashMultimap_OWString_Interface();
|
||||
aImplMap = m_ImplementationMap;
|
||||
m_ImplementationMap = HashSet_Ref();
|
||||
std::swap(aImplMap, m_ImplementationMap);
|
||||
m_ImplementationNameMap = HashMap_OWString_Interface();
|
||||
m_SetLoadedFactories= HashSet_Ref();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user