VirtualBox

Changeset 24989 in vbox for trunk/src/VBox/Main/HostImpl.cpp


Ignore:
Timestamp:
Nov 26, 2009 11:31:46 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
55293
Message:

Main: enable -Wshadow gcc option to warn about shadowed variables and fix all resulting warnings; in particular, rename some stack and member variables and rename getter methods like id() to getId()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/HostImpl.cpp

    r24403 r24989  
    13481348    /* notify the proxy (only when the filter is active) */
    13491349    if (    m->pUSBProxyService->isActive()
    1350          && pFilter->data().mActive)
    1351     {
    1352         ComAssertRet(pFilter->id() == NULL, E_FAIL);
    1353         pFilter->id() = m->pUSBProxyService->insertFilter(&pFilter->data().mUSBFilter);
     1350         && pFilter->getData().mActive)
     1351    {
     1352        ComAssertRet(pFilter->getId() == NULL, E_FAIL);
     1353        pFilter->getId() = m->pUSBProxyService->insertFilter(&pFilter->getData().mUSBFilter);
    13541354    }
    13551355
     
    14021402
    14031403    /* notify the proxy (only when the filter is active) */
    1404     if (m->pUSBProxyService->isActive() && filter->data().mActive)
    1405     {
    1406         ComAssertRet (filter->id() != NULL, E_FAIL);
    1407         m->pUSBProxyService->removeFilter (filter->id());
    1408         filter->id() = NULL;
     1404    if (m->pUSBProxyService->isActive() && filter->getData().mActive)
     1405    {
     1406        ComAssertRet(filter->getId() != NULL, E_FAIL);
     1407        m->pUSBProxyService->removeFilter(filter->getId());
     1408        filter->getId() = NULL;
    14091409    }
    14101410
     
    16771677
    16781678        /* notify the proxy (only when the filter is active) */
    1679         if (pFilter->data().mActive)
     1679        if (pFilter->getData().mActive)
    16801680        {
    16811681            HostUSBDeviceFilter *flt = pFilter; /* resolve ambiguity */
    1682             flt->id() = m->pUSBProxyService->insertFilter(&pFilter->data().mUSBFilter);
     1682            flt->getId() = m->pUSBProxyService->insertFilter(&pFilter->getData().mUSBFilter);
    16831683        }
    16841684    }
     
    17751775        {
    17761776            // insert/remove the filter from the proxy
    1777             if (aFilter->data().mActive)
     1777            if (aFilter->getData().mActive)
    17781778            {
    1779                 ComAssertRet (aFilter->id() == NULL, E_FAIL);
    1780                 aFilter->id() = m->pUSBProxyService->insertFilter (&aFilter->data().mUSBFilter);
     1779                ComAssertRet(aFilter->getId() == NULL, E_FAIL);
     1780                aFilter->getId() = m->pUSBProxyService->insertFilter(&aFilter->getData().mUSBFilter);
    17811781            }
    17821782            else
    17831783            {
    1784                 ComAssertRet (aFilter->id() != NULL, E_FAIL);
    1785                 m->pUSBProxyService->removeFilter (aFilter->id());
    1786                 aFilter->id() = NULL;
     1784                ComAssertRet(aFilter->getId() != NULL, E_FAIL);
     1785                m->pUSBProxyService->removeFilter(aFilter->getId());
     1786                aFilter->getId() = NULL;
    17871787            }
    17881788        }
    17891789        else
    17901790        {
    1791             if (aFilter->data().mActive)
     1791            if (aFilter->getData().mActive)
    17921792            {
    17931793                // update the filter in the proxy
    1794                 ComAssertRet (aFilter->id() != NULL, E_FAIL);
    1795                 m->pUSBProxyService->removeFilter (aFilter->id());
    1796                 aFilter->id() = m->pUSBProxyService->insertFilter (&aFilter->data().mUSBFilter);
     1794                ComAssertRet(aFilter->getId() != NULL, E_FAIL);
     1795                m->pUSBProxyService->removeFilter(aFilter->getId());
     1796                aFilter->getId() = m->pUSBProxyService->insertFilter(&aFilter->getData().mUSBFilter);
    17971797            }
    17981798        }
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