VirtualBox

Ignore:
Timestamp:
Nov 20, 2008 9:20:16 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
39611
Message:

FE/Qt4: Preallocate vector in MediaEnumThread.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp

    r14382 r14388  
    28442844
    28452845        MediaEnumThread (VBoxMediaList &aList)
    2846             : mSavedIt (aList.begin())
    2847         {
     2846            : mVector (aList.size())
     2847            , mSavedIt (aList.begin())
     2848        {
     2849            int i = 0;
    28482850            for (VBoxMediaList::const_iterator it = aList.begin();
    28492851                 it != aList.end(); ++ it)
    2850                 mVector.append (*it);
     2852                mVector [i ++] = *it;
    28512853        }
    28522854
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette