VirtualBox

Changeset 95115 in vbox for trunk/src/VBox/Main/src-all


Ignore:
Timestamp:
May 25, 2022 8:53:28 PM (3 years ago)
Author:
vboxsync
Message:

Main/ExtPackManagerImpl: Don't make an extra copy of the llInstalledExtPacks, use std::copy to do the copying instead (c++17).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-all/ExtPackManagerImpl.cpp

    r94912 r95115  
    4545#include <VBox/sup.h>
    4646#include <VBox/version.h>
     47
     48#include <algorithm>
     49
    4750#include "AutoCaller.h"
    4851#include "Global.h"
     
    24642467    AutoReadLock autoLock(this COMMA_LOCKVAL_SRC_POS);
    24652468
    2466 
    2467     SafeIfaceArray<IExtPack> SaExtPacks(m->llInstalledExtPacks);
    2468     aInstalledExtPacks.resize(SaExtPacks.size());
    2469     for(size_t i = 0; i < SaExtPacks.size(); ++i)
    2470         aInstalledExtPacks[i] = SaExtPacks[i];
     2469    aInstalledExtPacks.resize(m->llInstalledExtPacks.size());
     2470    std::copy(m->llInstalledExtPacks.begin(), m->llInstalledExtPacks.end(), aInstalledExtPacks.begin());
    24712471
    24722472    return S_OK;
Note: See TracChangeset for help on using the changeset viewer.

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