summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/printer/cpdmgr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/generic/printer/cpdmgr.cxx')
-rw-r--r--vcl/unx/generic/printer/cpdmgr.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/vcl/unx/generic/printer/cpdmgr.cxx b/vcl/unx/generic/printer/cpdmgr.cxx
index eb5c079e4625..7c932a410bba 100644
--- a/vcl/unx/generic/printer/cpdmgr.cxx
+++ b/vcl/unx/generic/printer/cpdmgr.cxx
@@ -517,21 +517,21 @@ void CPDManager::initialize()
// remove everything that is not a CUPS printer and not
// a special purpose printer (PDF, Fax)
- std::list< OUString > aRemovePrinters;
- for( std::unordered_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.begin();
- it != m_aPrinters.end(); ++it )
+ std::unordered_map< OUString, Printer, OUStringHash >::iterator it = m_aPrinters.begin();
+ while (it != m_aPrinters.end())
{
if( m_aCPDDestMap.find( it->first ) != m_aCPDDestMap.end() )
+ {
+ ++it;
continue;
+ }
if( !it->second.m_aInfo.m_aFeatures.isEmpty() )
+ {
+ ++it;
continue;
- aRemovePrinters.push_back( it->first );
- }
- while( aRemovePrinters.begin() != aRemovePrinters.end() )
- {
- m_aPrinters.erase( aRemovePrinters.front() );
- aRemovePrinters.pop_front();
+ }
+ it = m_aPrinters.erase(it);
}
#endif
}