VirtualBox

Changeset 31472 in vbox for trunk


Ignore:
Timestamp:
Aug 9, 2010 9:48:11 AM (14 years ago)
Author:
vboxsync
Message:

Main: settings: bumpSettingsVersionIfNeeded(): optimization (move cheap 1.10 check before expensive one)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/xml/Settings.cpp

    r31471 r31472  
    42344234    }
    42354235
     4236    // VirtualBox 3.2: Check for non default I/O settings
     4237    if (m->sv < SettingsVersion_v1_10)
     4238    {
     4239        if (   (hardwareMachine.ioSettings.fIoCacheEnabled != true)
     4240            || (hardwareMachine.ioSettings.ulIoCacheSize != 5)
     4241                // and VRDP video channel
     4242            || (hardwareMachine.vrdpSettings.fVideoChannel)
     4243                // and page fusion
     4244            || (hardwareMachine.fPageFusionEnabled)
     4245                // and CPU hotplug, RTC timezone control, HID type and HPET
     4246            || fRTCUseUTC
     4247            || hardwareMachine.fCpuHotPlug
     4248            || hardwareMachine.pointingHidType != PointingHidType_PS2Mouse
     4249            || hardwareMachine.keyboardHidType != KeyboardHidType_PS2Keyboard
     4250            || hardwareMachine.fHpetEnabled
     4251           )
     4252            m->sv = SettingsVersion_v1_10;
     4253    }
     4254
    42364255    // VirtualBox 3.2 adds NAT and boot priority to the NIC config in Main
    42374256    if (m->sv < SettingsVersion_v1_10)
     
    42854304    }
    42864305
    4287     if (m->sv < SettingsVersion_v1_10)
    4288     {
    4289         // VirtualBox 3.2: Check for non default I/O settings and bump the settings version.
    4290         if (   (hardwareMachine.ioSettings.fIoCacheEnabled != true)
    4291             || (hardwareMachine.ioSettings.ulIoCacheSize != 5)
    4292                 // and VRDP video channel
    4293             || (hardwareMachine.vrdpSettings.fVideoChannel)
    4294                 // and page fusion
    4295             || (hardwareMachine.fPageFusionEnabled)
    4296                 // and CPU hotplug, RTC timezone control, HID type and HPET
    4297             || fRTCUseUTC
    4298             || hardwareMachine.fCpuHotPlug
    4299             || hardwareMachine.pointingHidType != PointingHidType_PS2Mouse
    4300             || hardwareMachine.keyboardHidType != KeyboardHidType_PS2Keyboard
    4301             || hardwareMachine.fHpetEnabled
    4302            )
    4303             m->sv = SettingsVersion_v1_10;
    4304     }
    4305 
    43064306    // all the following require settings version 1.9
    43074307    if (    (m->sv < SettingsVersion_v1_9)
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