VirtualBox

Changeset 76376 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Dec 22, 2018 10:32:24 PM (6 years ago)
Author:
vboxsync
Message:

VBoxUhgsmi.h: GCC doesn't like unnamed sub-structures in C++ code, so ditched them for VBOXUHGSMI_BUFFER_TYPE_FLAGS, VBOXUHGSMI_BUFFER_LOCK_FLAGS and VBOXUHGSMI_BUFFER_SUBMIT_FLAGS. Also skipped the outer wrapper structures for each of these types as all it contained was an unnamed union, so just make the typedefs unions straight away. Fixed some hungarian inconsistency between the three types ('b' == byte, not boolean in VBox, don't forget).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/Graphics/VBoxUhgsmi.h

    r69686 r76376  
    3535typedef struct VBOXUHGSMI_BUFFER *PVBOXUHGSMI_BUFFER;
    3636
    37 typedef struct VBOXUHGSMI_BUFFER_TYPE_FLAGS
     37typedef union VBOXUHGSMI_BUFFER_TYPE_FLAGS
    3838{
    39     union
     39    uint32_t Value;
     40    struct
    4041    {
    41         struct
    42         {
    43             uint32_t fCommand    : 1;
    44             uint32_t Reserved    : 31;
    45         } RT_STRUCT_NM(s);
    46         uint32_t Value;
    47     } RT_UNION_NM(u);
     42        uint32_t fCommand       : 1;
     43        uint32_t Reserved       : 31;
     44    } s;
    4845} VBOXUHGSMI_BUFFER_TYPE_FLAGS;
    4946
    50 typedef struct VBOXUHGSMI_BUFFER_LOCK_FLAGS
     47typedef union VBOXUHGSMI_BUFFER_LOCK_FLAGS
    5148{
    52     union
     49    uint32_t Value;
     50    struct
    5351    {
    54         struct
    55         {
    56             uint32_t bReadOnly   : 1;
    57             uint32_t bWriteOnly  : 1;
    58             uint32_t bDonotWait  : 1;
    59             uint32_t bDiscard    : 1;
    60             uint32_t bLockEntire : 1;
    61             uint32_t Reserved    : 27;
    62         } RT_STRUCT_NM(s);
    63         uint32_t Value;
    64     } RT_UNION_NM(u);
     52        uint32_t fReadOnly      : 1;
     53        uint32_t fWriteOnly     : 1;
     54        uint32_t fDonotWait     : 1;
     55        uint32_t fDiscard       : 1;
     56        uint32_t fLockEntire    : 1;
     57        uint32_t Reserved       : 27;
     58    } s;
    6559} VBOXUHGSMI_BUFFER_LOCK_FLAGS;
    6660
    67 typedef struct VBOXUHGSMI_BUFFER_SUBMIT_FLAGS
     61typedef union VBOXUHGSMI_BUFFER_SUBMIT_FLAGS
    6862{
    69     union
     63    uint32_t Value;
     64    struct
    7065    {
    71         struct
    72         {
    73             uint32_t bHostReadOnly          : 1;
    74             uint32_t bHostWriteOnly         : 1;
    75             uint32_t bDoNotRetire           : 1; /**< the buffer will be used in a subsequent command */
    76             uint32_t bEntireBuffer          : 1;
    77             uint32_t Reserved               : 28;
    78         } RT_STRUCT_NM(s);
    79         uint32_t Value;
    80     } RT_UNION_NM(u);
     66        uint32_t fHostReadOnly  : 1;
     67        uint32_t fHostWriteOnly : 1;
     68        uint32_t fDoNotRetire   : 1; /**< the buffer will be used in a subsequent command */
     69        uint32_t fEntireBuffer  : 1;
     70        uint32_t Reserved       : 28;
     71    } s;
    8172} VBOXUHGSMI_BUFFER_SUBMIT_FLAGS, *PVBOXUHGSMI_BUFFER_SUBMIT_FLAGS;
    8273
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