VirtualBox

Changeset 49761 in vbox


Ignore:
Timestamp:
Dec 3, 2013 6:34:22 PM (11 years ago)
Author:
vboxsync
Message:

Main/Host: remove redundant casts, plus lots of whitespace cleanup

File:
1 edited

Legend:

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

    r49760 r49761  
    509509////////////////////////////////////////////////////////////////////////////////
    510510//
    511 // ISnapshot public methods
     511// IHost public methods
    512512//
    513513////////////////////////////////////////////////////////////////////////////////
     
    516516 * Returns a list of host DVD drives.
    517517 *
    518  * @returns status code
     518 * @returns COM status code
    519519 * @param drives address of result pointer
    520520 */
     
    542542 * Returns a list of host floppy drives.
    543543 *
    544  * @returns status code
     544 * @returns COM status code
    545545 * @param drives address of result pointer
    546546 */
     
    572572                                  INetCfgComponent *pncc)
    573573{
    574     LPWSTR              lpszName;
    575     GUID                IfGuid;
     574    LPWSTR lpszName;
     575    GUID IfGuid;
    576576    HRESULT hr;
    577577    int rc = VERR_GENERAL_FAILURE;
     
    612612 * Returns a list of host network interfaces.
    613613 *
    614  * @returns status code
     614 * @returns COM status code
    615615 * @param drives address of result pointer
    616616 */
     
    618618{
    619619    aNetworkInterfaces.resize(0);
    620 #if defined(RT_OS_WINDOWS) ||  defined(VBOX_WITH_NETFLT) /*|| defined(RT_OS_OS2)*/
     620#if defined(RT_OS_WINDOWS) || defined(VBOX_WITH_NETFLT) /*|| defined(RT_OS_OS2)*/
    621621    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    622622# ifdef VBOX_WITH_HOSTNETIF_API
     
    809809    for (size_t i = 0; i < resultArr.size(); ++i)
    810810    {
    811          ComObjPtr<IHostUSBDevice> iHu = static_cast<IHostUSBDevice *>(resultArr[i]);
     811         ComObjPtr<IHostUSBDevice> iHu = resultArr[i];
    812812         iHu.queryInterfaceTo(aUSBDevices[i].asOutParam());
    813813    }
     
    913913 * Returns the number of installed logical processors
    914914 *
    915  * @returns status code
     915 * @returns COM status code
    916916 * @param   count address of result variable
    917917 */
     
    928928 * Returns the number of online logical processors
    929929 *
    930  * @returns status code
     930 * @returns COM status code
    931931 * @param   count address of result variable
    932932 */
     
    942942 * Returns the number of installed physical processor cores.
    943943 *
    944  * @returns status code
     944 * @returns COM status code
    945945 * @param   count address of result variable
    946946 */
     
    956956 * Returns the number of installed physical processor cores.
    957957 *
    958  * @returns status code
     958 * @returns COM status code
    959959 * @param   count address of result variable
    960960 */
     
    970970 * Returns the (approximate) maximum speed of the given host CPU in MHz
    971971 *
    972  * @returns status code
     972 * @returns COM status code
    973973 * @param   cpu id to get info for.
    974974 * @param   speed address of result variable, speed is 0 if unknown or aCpuId is invalid.
     
    986986 * Returns a description string for the host CPU
    987987 *
    988  * @returns status code
     988 * @returns COM status code
    989989 * @param   cpu id to get info for.
    990990 * @param   description address of result variable, empty string if not known or aCpuId is invalid.
    991991 */
    992 HRESULT  Host::getProcessorDescription(ULONG aCpuId, com::Utf8Str &aDescription)
     992HRESULT Host::getProcessorDescription(ULONG aCpuId, com::Utf8Str &aDescription)
    993993{
    994994    // no locking required
     
    10061006 * Returns whether a host processor feature is supported or not
    10071007 *
    1008  * @returns status code
     1008 * @returns COM status code
    10091009 * @param   Feature to query.
    10101010 * @param   address of supported bool result variable
    10111011 */
    1012 HRESULT  Host::getProcessorFeature(ProcessorFeature_T aFeature, BOOL *aSupported)
     1012HRESULT Host::getProcessorFeature(ProcessorFeature_T aFeature, BOOL *aSupported)
    10131013{
    10141014    /* Validate input. */
     
    10921092 * Returns the specific CPUID leaf.
    10931093 *
    1094  * @returns status code
     1094 * @returns COM status code
    10951095 * @param   aCpuId              The CPU number. Mostly ignored.
    10961096 * @param   aLeaf               The leaf number.
     
    11261126 * Returns the amount of installed system memory in megabytes
    11271127 *
    1128  * @returns status code
     1128 * @returns COM status code
    11291129 * @param   size address of result variable
    11301130 */
     
    11441144 * Returns the current system memory free space in megabytes
    11451145 *
    1146  * @returns status code
     1146 * @returns COM status code
    11471147 * @param   available address of result variable
    11481148 */
     
    11621162 * Returns the name string of the host operating system
    11631163 *
    1164  * @returns status code
     1164 * @returns COM status code
    11651165 * @param   os address of result variable
    11661166 */
     
    11801180 * Returns the version string of the host operating system
    11811181 *
    1182  * @returns status code
     1182 * @returns COM status code
    11831183 * @param   os address of result variable
    11841184 */
     
    12151215 * Returns the current host time in milliseconds since 1970-01-01 UTC.
    12161216 *
    1217  * @returns status code
     1217 * @returns COM status code
    12181218 * @param   time address of result variable
    12191219 */
     
    12651265    /* No need to lock anything. If there ever will - watch out, the function
    12661266     * called below grabs the VirtualBox lock. */
    1267     IHostNetworkInterface *iHn = static_cast<IHostNetworkInterface *>(aHostInterface);
    1268     IProgress *iHn2 = static_cast<IProgress *>(aProgress);
     1267    IHostNetworkInterface *iHn = aHostInterface;
     1268    IProgress *iHn2 = aProgress;
    12691269
    12701270    int r = NetIfCreateHostOnlyNetworkInterface(m->pParent, &iHn, &iHn2);
     
    13241324    {
    13251325        ComPtr<IHostNetworkInterface> iface;
    1326         rc  = findHostNetworkInterfaceById(aId, iface);
     1326        rc = findHostNetworkInterfaceById(aId, iface);
    13271327        if (FAILED(rc))
    13281328            return setError(VBOX_E_OBJECT_NOT_FOUND,
     
    13331333    }
    13341334
    1335     IProgress *iPr  = static_cast<IProgress *>(aProgress);
     1335    IProgress *iPr = aProgress;
    13361336
    13371337    int r = NetIfRemoveHostOnlyNetworkInterface(m->pParent, Guid(aId).ref(), &iPr);
     
    15391539    {
    15401540        Bstr n;
    1541         (*it)->COMGETTER(Name) (n.asOutParam());
     1541        (*it)->COMGETTER(Name)(n.asOutParam());
    15421542        if (n == aName)
    15431543            found = *it;
     
    15761576    {
    15771577        Bstr g;
    1578         (*it)->COMGETTER(Id) (g.asOutParam());
     1578        (*it)->COMGETTER(Id)(g.asOutParam());
    15791579        if (Guid(g) == aId)
    15801580            found = *it;
     
    16311631    aDevice = NULL;
    16321632    SafeIfaceArray<IHostUSBDevice> devsvec;
    1633     HRESULT rc = COMGETTER(USBDevices) (ComSafeArrayAsOutParam(devsvec));
     1633    HRESULT rc = COMGETTER(USBDevices)(ComSafeArrayAsOutParam(devsvec));
    16341634    if (FAILED(rc)) return rc;
    16351635
     
    16371637    {
    16381638        Bstr address;
    1639         rc = devsvec[i]->COMGETTER(Address) (address.asOutParam());
     1639        rc = devsvec[i]->COMGETTER(Address)(address.asOutParam());
    16401640        if (FAILED(rc)) return rc;
    16411641        if (address == aName)
    16421642        {
    1643             return (ComObjPtr<IHostUSBDevice> (devsvec[i]).queryInterfaceTo(aDevice.asOutParam()));
     1643            return (ComObjPtr<IHostUSBDevice>(devsvec[i]).queryInterfaceTo(aDevice.asOutParam()));
    16441644        }
    16451645    }
     
    16651665
    16661666    SafeIfaceArray<IHostUSBDevice> devsvec;
    1667     HRESULT rc = COMGETTER(USBDevices) (ComSafeArrayAsOutParam(devsvec));
     1667    HRESULT rc = COMGETTER(USBDevices)(ComSafeArrayAsOutParam(devsvec));
    16681668    if (FAILED(rc)) return rc;
    16691669
     
    16711671    {
    16721672        Bstr id;
    1673         rc = devsvec[i]->COMGETTER(Id) (id.asOutParam());
     1673        rc = devsvec[i]->COMGETTER(Id)(id.asOutParam());
    16741674        if (FAILED(rc)) return rc;
    16751675        if (Guid(id) == aId)
    16761676        {
    1677             return (ComObjPtr<IHostUSBDevice> (devsvec[i]).queryInterfaceTo(aDevice.asOutParam()));
     1677            return (ComObjPtr<IHostUSBDevice>(devsvec[i]).queryInterfaceTo(aDevice.asOutParam()));
    16781678        }
    16791679    }
     
    16991699 * Returns a list of host video capture devices (webcams, etc).
    17001700 *
    1701  * @returns status code
     1701 * @returns COM status code
    17021702 * @param aVideoInputDevices Array of interface pointers to be filled.
    17031703 */
     
    18021802 * @param fRefresh Whether to refresh the host drives list even if this is not the first call.
    18031803 * @param pll Caller's pointer which gets set to the static list of host drives.
    1804  * @return
     1804 * @returns COM status code
    18051805 */
    18061806HRESULT Host::i_getDrives(DeviceType_T mediumType,
     
    29862986        bool fGone = true;
    29872987        Bstr nameOld;
    2988         (*itOld)->COMGETTER(Name) (nameOld.asOutParam());
     2988        (*itOld)->COMGETTER(Name)(nameOld.asOutParam());
    29892989        for (itNew = listCopy.begin(); itNew != listCopy.end(); ++itNew)
    29902990        {
    29912991            Bstr nameNew;
    2992             (*itNew)->COMGETTER(Name) (nameNew.asOutParam());
     2992            (*itNew)->COMGETTER(Name)(nameNew.asOutParam());
    29932993            if (nameNew == nameOld)
    29942994            {
     
    30193019        {
    30203020            Bstr n;
    3021             (*itNew)->COMGETTER(Name) (n.asOutParam());
     3021            (*itNew)->COMGETTER(Name)(n.asOutParam());
    30223022            LogRel(("Host::updateNetIfList: failed to get interface type for %ls\n", n.raw()));
    30233023        }
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