VirtualBox

Ignore:
Timestamp:
Jul 8, 2008 9:04:25 AM (16 years ago)
Author:
vboxsync
Message:

FE/Qt: Cache values used several times in local variables (IPC calls may be expensive).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxNewVMWzd.ui.h

    r10311 r10351  
    329329    CGuestOSType type = vboxGlobal().vmGuestOSType (cbOS->currentItem());
    330330    AssertMsg (!type.isNull(), ("vmGuestOSType() must return non-null type"));
    331     cmachine.SetOSTypeId (type.GetId());
    332 
    333     if (type.GetId() == "os2warp3"  ||
    334         type.GetId() == "os2warp4"  ||
    335         type.GetId() == "os2warp45" ||
    336         type.GetId() == "ecs")
     331    QString typeId = type.GetId();
     332    cmachine.SetOSTypeId (typeId);
     333
     334    if (typeId == "os2warp3"  ||
     335        typeId == "os2warp4"  ||
     336        typeId == "os2warp45" ||
     337        typeId == "ecs")
    337338        cmachine.SetHWVirtExEnabled (KTSBool_True);
    338339
     
    345346#ifdef VBOX_WITH_E1000
    346347        /* Default to e1k on solaris */
    347         if (type.GetId() == "solaris" ||
    348             type.GetId() == "opensolaris")
     348        if (typeId == "solaris" ||
     349            typeId == "opensolaris")
    349350            cadapter.SetAdapterType (KNetworkAdapterType_I82540EM);
    350351#endif /* VBOX_WITH_E1000 */
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