VirtualBox

Ignore:
Timestamp:
Feb 23, 2010 2:15:16 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: more little optimizations

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionsPool.h

    r26706 r26707  
    3535    UIActionType_Simple,
    3636    UIActionType_Toggle,
    37     UIActionType_Menu,
    38 
    39     /** The usual 32-bit type hack. */
    40     UIActionType_32Bit_Hack = 0x7fffffff
     37    UIActionType_Menu
    4138};
    4239
     
    10097#endif
    10198
    102     UIActionIndex_End,
    103     /** The usual 32-bit type hack. */
    104     UIActionIndex_32Bit_Hack = 0x7fffffff
     99    UIActionIndex_End
    105100};
    106101
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp

    r26637 r26707  
    161161UIIndicatorsPool::UIIndicatorsPool(QObject *pParent)
    162162    : QObject(pParent)
    163 {
    164     /* Resize & clean actions vector */
    165     m_IndicatorsPool.resize(UIIndicatorIndex_Max);
    166     for (int i = 0; i < m_IndicatorsPool.size(); ++ i)
    167         m_IndicatorsPool[i] = 0;
     163    , m_IndicatorsPool(UIIndicatorIndex_End, 0)
     164{
    168165}
    169166
    170167UIIndicatorsPool::~UIIndicatorsPool()
    171168{
    172     for (int i = 0; i < m_IndicatorsPool.size(); ++ i)
     169    for (int i = 0; i < m_IndicatorsPool.size(); ++i)
    173170    {
    174171        delete m_IndicatorsPool[i];
     
    180177QIStateIndicator* UIIndicatorsPool::indicator(UIIndicatorIndex index)
    181178{
    182     if (!m_IndicatorsPool[index])
     179    if (!m_IndicatorsPool.at(index))
    183180    {
    184181        switch (index)
     
    212209        }
    213210    }
    214     return m_IndicatorsPool[index];
     211    return m_IndicatorsPool.at(index);
    215212}
    216213
    217214#include "UIIndicatorsPool.moc"
     215
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.h

    r26637 r26707  
    3737    UIIndicatorIndex_Mouse,
    3838    UIIndicatorIndex_Hostkey,
    39     UIIndicatorIndex_Max
     39    UIIndicatorIndex_End
    4040};
    4141
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