- GetSelections( selections );
-
- if ((selections.GetCount() == 0) && (m_oldSelections.GetCount() == 0))
- {
- // nothing changed, just leave
- return;
- }
-
- if (selections.GetCount() == m_oldSelections.GetCount())
+ GetSelections(selections);
+
+ if ( selections.empty() && m_oldSelections.empty() )
+ {
+ // nothing changed, just leave
+ return;
+ }
+
+ const size_t countSel = selections.size(),
+ countSelOld = m_oldSelections.size();
+ if ( countSel == countSelOld )
+ {
+ bool changed = false;
+ for ( size_t idx = 0; idx < countSel; idx++ )