VirtualBox

Changeset 44376 in vbox


Ignore:
Timestamp:
Jan 25, 2013 1:35:31 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
83346
Message:

The changes inside loops where enumeration MediumVariant is converted. For correct work under both systems Windows and Linux because enumeration is defined differently on these systems.

Location:
trunk/src/VBox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp

    r44365 r44376  
    375375        com::SafeArray<MediumVariant_T> l_variants(sizeof(MediumVariant_T)*8);
    376376
    377         for (unsigned int i = 0; i < l_variants.size(); ++i)
    378         {
    379             MediumVariant_T temp = DiskVariant;
    380             l_variants [i] = (temp & (1<<i));
     377        for (ulong i = 0; i < l_variants.size(); ++i)
     378        {
     379            ulong temp = DiskVariant;
     380            temp &= 1<<i;
     381            l_variants [i] = (MediumVariant_T)temp;
    381382        }
    382383
     
    687688        com::SafeArray<MediumVariant_T> l_variants(sizeof(MediumVariant_T)*8);
    688689
    689         for (unsigned int i = 0; i < l_variants.size(); ++i)
    690         {
    691             MediumVariant_T temp = DiskVariant;
    692             l_variants [i] = (temp & (1<<i));
     690        for (ulong i = 0; i < l_variants.size(); ++i)
     691        {
     692            ulong temp = DiskVariant;
     693            temp &= 1<<i;
     694            l_variants [i] = (MediumVariant_T)temp;
    693695        }
    694696
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVD.cpp

    r44365 r44376  
    7676    {
    7777        qulonglong temp = uVariant;
    78         l_variants [i] = (KMediumVariant)(temp & (1<<i));
     78        temp &= 1<<i;
     79        l_variants [i] = (KMediumVariant)temp;
    7980    }
    8081
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.cpp

    r44365 r44376  
    7979    {
    8080        qulonglong temp = uVariant;
    81         l_variants [i] = (KMediumVariant)(temp & (1<<i));
     81        temp &= 1<<i;
     82        l_variants [i] = (KMediumVariant)temp;
    8283    }
    8384
  • trunk/src/VBox/Main/src-server/MediumImpl.cpp

    r44365 r44376  
    15431543    SafeArray<MediumVariant_T> variants(sizeof(MediumVariant_T)*8);
    15441544
    1545     for (unsigned int i = 0; i < variants.size(); ++i)
    1546     {
    1547         MediumVariant_T temp = m->variant;
    1548         variants [i] = (temp & (1<<i));
     1545    for (ulong i = 0; i < variants.size(); ++i)
     1546    {
     1547        ulong temp = m->variant;
     1548        temp &= 1<<i;
     1549        variants [i] = (MediumVariant_T)temp;
    15491550    }
    15501551
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