VirtualBox

Changeset 90145 in vbox for trunk


Ignore:
Timestamp:
Jul 9, 2021 11:35:18 PM (4 years ago)
Author:
vboxsync
Message:

DevHdaCodec: Mark afNodeClassifications as const to encourage more compiler optimizations. bugref:9890

Location:
trunk/src/VBox/Devices/Audio
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DevHdaCodec.cpp

    r90144 r90145  
    798798    pThis->fInReset = false;
    799799
     800    uint16_t *pafNodeClassifications = (uint16_t *)&pThis->afNodeClassifications[0];
    800801#define STAC9220WIDGET(a_Type) do { \
    801802            AssertCompile(RT_ELEMENTS(g_abStac9220##a_Type##s) <= RT_ELEMENTS(pThis->ab##a_Type##s)); \
     
    808809                { \
    809810                    AssertReturn(idNode < RT_ELEMENTS(pThis->aNodes), VERR_INTERNAL_ERROR_3); \
    810                     pThis->afNodeClassifications[idNode] |= RT_CONCAT(CODEC_NODE_CLS_,a_Type); \
     811                    pafNodeClassifications[idNode] |= RT_CONCAT(CODEC_NODE_CLS_,a_Type); \
    811812                } \
    812813                pbDst[i] = idNode; \
  • trunk/src/VBox/Devices/Audio/DevHdaCodec.h

    r90144 r90145  
    855855
    856856    /** The CODEC_NODE_CLS_XXX flags for each node. */
    857     uint16_t        afNodeClassifications[CODEC_NODES_MAX];
     857    uint16_t const  afNodeClassifications[CODEC_NODES_MAX];
    858858
    859859    CODECNODE       aNodes[CODEC_NODES_MAX];
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