VirtualBox

Ignore:
Timestamp:
Jul 7, 2010 4:20:03 PM (15 years ago)
Author:
vboxsync
Message:

Main: remove SupportErrorInfo template magic

File:
1 edited

Legend:

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

    r28800 r30714  
    2222////////////////////////////////////////////////////////////////////////////////
    2323
    24 HRESULT VirtualBoxErrorInfo::init (HRESULT aResultCode, const GUID &aIID,
    25                                    CBSTR aComponent, CBSTR aText,
    26                                    IVirtualBoxErrorInfo *aNext)
    27 {
    28     mResultCode = aResultCode;
    29     mIID = aIID;
    30     mComponent = aComponent;
    31     mText = aText;
     24HRESULT VirtualBoxErrorInfo::init(HRESULT aResultCode,
     25                                  const GUID &aIID,
     26                                  const char *pcszComponent,
     27                                  const Utf8Str &strText,
     28                                  IVirtualBoxErrorInfo *aNext)
     29{
     30    m_resultCode = aResultCode;
     31    m_IID = aIID;
     32    m_strComponent = pcszComponent;
     33    m_strText = strText;
    3234    mNext = aNext;
    3335
     
    4244    CheckComArgOutPointerValid(aResultCode);
    4345
    44     *aResultCode = mResultCode;
     46    *aResultCode = m_resultCode;
    4547    return S_OK;
    4648}
     
    5052    CheckComArgOutPointerValid(aIID);
    5153
    52     mIID.toUtf16().cloneTo(aIID);
     54    m_IID.toUtf16().cloneTo(aIID);
    5355    return S_OK;
    5456}
     
    5860    CheckComArgOutPointerValid(aComponent);
    5961
    60     mComponent.cloneTo(aComponent);
     62    m_strComponent.cloneTo(aComponent);
    6163    return S_OK;
    6264}
     
    6668    CheckComArgOutPointerValid(aText);
    6769
    68     mText.cloneTo(aText);
     70    m_strText.cloneTo(aText);
    6971    return S_OK;
    7072}
     
    9496     * corresponding fields will simply remain null in this case). */
    9597
    96     mResultCode = S_OK;
    97     rc = aInfo->GetGUID (mIID.asOutParam());
     98    m_resultCode = S_OK;
     99    rc = aInfo->GetGUID(m_IID.asOutParam());
    98100    AssertComRC (rc);
    99     rc = aInfo->GetSource (mComponent.asOutParam());
     101    Bstr bstrComponent;
     102    rc = aInfo->GetSource(bstrComponent.asOutParam());
    100103    AssertComRC (rc);
    101     rc = aInfo->GetDescription (mText.asOutParam());
     104    m_strComponent = bstrComponent;
     105    Bstr bstrText;
     106    rc = aInfo->GetDescription(bstrText.asOutParam());
    102107    AssertComRC (rc);
     108    m_strText = bstrText;
    103109
    104110    return S_OK;
     
    153159     * corresponding fields will simply remain null in this case). */
    154160
    155     rc = aInfo->GetResult(&mResultCode);
     161    rc = aInfo->GetResult(&m_resultCode);
    156162    AssertComRC(rc);
    157163
     
    161167    if (NS_SUCCEEDED(rc))
    162168    {
    163         mText = Bstr(pszMsg);
     169        m_strText = pszMsg;
    164170        nsMemory::Free(pszMsg);
    165171    }
    166172    else
    167         mText.setNull();
     173        m_strText.setNull();
    168174
    169175    return S_OK;
     
    178184    CheckComArgOutPointerValid(aMessage);
    179185
    180     Utf8Str (mText).cloneTo(aMessage);
     186    m_strText.cloneTo(aMessage);
    181187    return S_OK;
    182188}
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