VirtualBox

Changeset 31306 in vbox


Ignore:
Timestamp:
Aug 2, 2010 2:16:12 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
64333
Message:

Main: optimization

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MachineImpl.cpp

    r31301 r31306  
    80818081        if (pMedium)
    80828082        {
    8083             BOOL fHostDrive = FALSE;
    8084             rc = pMedium->COMGETTER(HostDrive)(&fHostDrive);
    8085             if (FAILED(rc))
    8086                 return rc;
    8087             if (fHostDrive)
     8083            if (pMedium->isHostDrive())
    80888084                dev.strHostDriveSrc = pMedium->getLocation();
    80898085            else
  • trunk/src/VBox/Main/MediumImpl.cpp

    r31300 r31306  
    26012601{
    26022602    return m->variant;
     2603}
     2604
     2605/**
     2606 * Internal method which returns true if this medium represents a host drive.
     2607 * @return
     2608 */
     2609bool Medium::isHostDrive() const
     2610{
     2611    return m->hostDrive;
    26032612}
    26042613
  • trunk/src/VBox/Main/include/MediumImpl.h

    r31300 r31306  
    159159    MediumState_T getState() const;
    160160    MediumVariant_T getVariant() const;
     161    bool isHostDrive() const;
    161162    const Utf8Str& getLocation() const;
    162163    const Utf8Str& getLocationFull() const;
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